import {Attribute, Component, Element} from './decorators.js'
import {ExComponent} from './ExComponent.js'
@Component('ex-button')
export class Button extends ExComponent {
protected static html = `
`
@Attribute()
protected label = 'Label'
@Element('button')
protected $button!: HTMLButtonElement
mount(): void {
this.$button.addEventListener('click', () => {
this.dispatchCustom('exClick', {})
})
}
render(): void {
super.render()
this.$button.innerText = this.label
}
}