Skip to content

Commit 452abd4

Browse files
authored
chore: add setVisible (#7214)
* chore: add setVisible * chore: format
1 parent e49c028 commit 452abd4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

core/icons/icon.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import * as dom from '../utils/dom.js';
1414
import {Size} from '../utils/size.js';
1515
import {Svg} from '../utils/svg.js';
1616
import type {IconType} from './icon_types.js';
17+
import * as deprecation from '../utils/deprecation.js';
1718

1819
/**
1920
* The abstract icon class. Icons are visual elements that live in the top-start
@@ -109,4 +110,14 @@ export abstract class Icon implements IIcon {
109110
}
110111

111112
onClick(): void {}
113+
114+
/**
115+
* Sets the visibility of the icon's bubble if one exists.
116+
*
117+
* @deprecated Use `setBubbleVisible` instead. To be removed in v11.
118+
*/
119+
setVisible(visibility: boolean): void {
120+
deprecation.warn('setVisible', 'v10', 'v11', 'setBubbleVisible');
121+
if (hasBubble(this)) this.setBubbleVisible(visibility);
122+
}
112123
}

0 commit comments

Comments
 (0)