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

Lines changed: 16 additions & 1 deletion
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

Lines changed: 16 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy