16 lines
340 B
JavaScript
16 lines
340 B
JavaScript
import { WebComponent, html } from "../../src/index.js";
|
|
|
|
export class Counter extends WebComponent {
|
|
static props = {
|
|
count: 123,
|
|
};
|
|
get template() {
|
|
return html`
|
|
<button on:click=${() => this.props.count = 'hey'}>
|
|
${this.props.count}
|
|
</button>
|
|
`;
|
|
}
|
|
}
|
|
|
|
customElements.define("my-counter", Counter);
|