UNPKG

@microsoft/teams.cards

Version:

<p> <a href="https://www.npmjs.com/package/@microsoft/teams.cards" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.cards" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=code" ta

82 lines (80 loc) 1.43 kB
import { Element } from '../base'; class Badge extends Element { type; /** * Controls the strength of the background color. */ appearance; /** * The name of the icon to display. */ icon; /** * Controls the position of the icon. */ iconPosition; /** * Controls the shape of the badge. */ shape; /** * The size of the badge. */ size; /** * The style of the badge. */ style; /** * The text to display. */ text; /** * Controls the tooltip text to display when the badge is hovered over. */ tooltip; constructor(options = {}) { super(); this.type = "Badge"; Object.assign(this, options); } static from(options) { return new Badge(options); } withAppearance(value) { this.appearance = value; return this; } withIcon(value, position) { this.icon = value; this.iconPosition = position; return this; } withIconPosition(value) { this.iconPosition = value; return this; } withShape(value) { this.shape = value; return this; } withSize(value) { this.size = value; return this; } withStyle(value) { this.style = value; return this; } withText(value) { this.text = value; return this; } withTooltip(value) { this.tooltip = value; return this; } } export { Badge }; //# sourceMappingURL=badge.mjs.map //# sourceMappingURL=badge.mjs.map