import { html, LitElement } from 'lit'; import { customElement, property, query } from 'lit/decorators.js'; import { classMap } from 'lit/directives/class-map.js'; import { ifDefined } from 'lit/directives/if-defined.js'; import '~/components/icon/icon'; import styles from './icon-button.styles'; /** * @since 2.0 * @status stable * * @dependency sl-icon * * @csspart base - The component's internal wrapper. */ @customElement('sl-icon-button') export default class SlIconButton extends LitElement { static styles = styles; @query('.icon-button') button: HTMLButtonElement | HTMLLinkElement; /** The name of the icon to draw. */ @property() name?: string; /** The name of a registered custom icon library. */ @property() library?: string; /** An external URL of an SVG file. */ @property() src?: string; /** When set, the underlying button will be rendered as an `` with this `href` instead of a ` `; } } declare global { interface HTMLElementTagNameMap { 'sl-icon-button': SlIconButton; } }