16 lines
334 B
JavaScript
16 lines
334 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}>
|
|
${this.props.count}
|
|
</button>
|
|
`;
|
|
}
|
|
}
|
|
|
|
customElements.define("my-counter", Counter);
|