UNPKG

@universal-material/web

Version:
43 lines 1.3 kB
import { __decorate } from "tslib"; import { html } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import { styles } from './icon-button.styles.js'; import { UmToggleButton } from './toggle-button.js'; let UmIconButton = class UmIconButton extends UmToggleButton { constructor() { super(...arguments); this.variant = 'standard'; this.width = 'default'; } static { this.styles = [UmToggleButton.styles, styles]; } _getContainerClasses() { return { ...super._getContainerClasses(), [this.variant]: true, [this.width]: true, }; } _renderContent() { return html ` <span class="icon-container" aria-hidden="true"> <span class="icon icon-default"> <slot></slot> </span> <span class="icon icon-selected"> <slot name="selected" @slotchange="${this._handleSelectedIconSlotChange}"></slot> </span> </span> `; } }; __decorate([ property() ], UmIconButton.prototype, "variant", void 0); __decorate([ property() ], UmIconButton.prototype, "width", void 0); UmIconButton = __decorate([ customElement('u-icon-button') ], UmIconButton); export { UmIconButton }; //# sourceMappingURL=icon-button.js.map