Skip to content

Commit

Permalink
chore: add setVisible (google#7214)
Browse files Browse the repository at this point in the history
* chore: add setVisible

* chore: format
  • Loading branch information
BeksOmega authored Jun 27, 2023
1 parent e49c028 commit 452abd4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/icons/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import * as dom from '../utils/dom.js';
import {Size} from '../utils/size.js';
import {Svg} from '../utils/svg.js';
import type {IconType} from './icon_types.js';
import * as deprecation from '../utils/deprecation.js';

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

onClick(): void {}

/**
* Sets the visibility of the icon's bubble if one exists.
*
* @deprecated Use `setBubbleVisible` instead. To be removed in v11.
*/
setVisible(visibility: boolean): void {
deprecation.warn('setVisible', 'v10', 'v11', 'setBubbleVisible');
if (hasBubble(this)) this.setBubbleVisible(visibility);
}
}

0 comments on commit 452abd4

Please sign in to comment.