Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ecbd65e

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

File tree

2 files changed

+32
-2
lines changed
Filter options

2 files changed

+32
-2
lines changed

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

Copy file name to clipboardExpand all lines: packages/coreui-vue/src/components/popover/CPopover.ts
+16-1Lines 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

Copy file name to clipboardExpand all lines: packages/coreui-vue/src/components/tooltip/CTooltip.ts
+16-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.