Skip to content

Commit ecbd65e

Browse files
committed
feat(CPopover, CTooltip): add the animation property to enable the control of the component's fade effect
1 parent 21bd401 commit ecbd65e

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

packages/coreui-vue/src/components/popover/CPopover.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ import { getRTLPlacement } from '../../utils'
88
const CPopover = defineComponent({
99
name: 'CPopover',
1010
props: {
11+
/**
12+
* Apply a CSS fade transition to the popover.
13+
*
14+
* @since 4.9.0-beta.2
15+
*/
16+
animation: {
17+
type: Boolean,
18+
default: true,
19+
},
1120
/**
1221
* Content for your component. If you want to pass non-string value please use dedicated slot `<template #content>...</template>`
1322
*/
@@ -163,7 +172,13 @@ const CPopover = defineComponent({
163172
h(
164173
'div',
165174
{
166-
class: 'popover fade bs-popover-auto',
175+
class: [
176+
'popover',
177+
'bs-popover-auto',
178+
{
179+
fade: props.animation,
180+
},
181+
],
167182
ref: popoverRef,
168183
role: 'tooltip',
169184
...attrs,

packages/coreui-vue/src/components/tooltip/CTooltip.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ import { getRTLPlacement } from '../../utils'
88
const CTooltip = defineComponent({
99
name: 'CTooltip',
1010
props: {
11+
/**
12+
* Apply a CSS fade transition to the tooltip.
13+
*
14+
* @since 4.9.0-beta.2
15+
*/
16+
animation: {
17+
type: Boolean,
18+
default: true,
19+
},
1120
/**
1221
* Content for your component. If you want to pass non-string value please use dedicated slot `<template #content>...</template>`
1322
*/
@@ -159,7 +168,13 @@ const CTooltip = defineComponent({
159168
h(
160169
'div',
161170
{
162-
class: 'tooltip fade bs-tooltip-auto',
171+
class: [
172+
'tooltip',
173+
'bs-tooltip-auto',
174+
{
175+
fade: props.animation,
176+
},
177+
],
163178
ref: tooltipRef,
164179
role: 'tooltip',
165180
...attrs,

0 commit comments

Comments
 (0)