import { LitElement, html, unsafeCSS } from 'lit'; import { customElement, property } from 'lit/decorators'; import styles from 'sass:./button-group.scss'; /** * @since 2.0 * @status stable * * @slot - One or more `` elements to display in the button group. * * @part base - The component's base wrapper. */ @customElement('sl-button-group') export default class SlButtonGroup extends LitElement { static styles = unsafeCSS(styles); /** A label to use for the button group's `aria-label` attribute. */ @property() label: string; handleFocus(event: CustomEvent) { const button = event.target as HTMLElement; button.classList.add('sl-focus'); } handleBlur(event: CustomEvent) { const button = event.target as HTMLElement; button.classList.remove('sl-focus'); } render() { return html`
`; } } declare global { interface HTMLElementTagNameMap { 'sl-button-group': SlButtonGroup; } }