import Element, { h } from "@skatejs/element-preact"; class MyCounterElement extends Element { static get props() { return { count: Number }; } inc = () => { this.count++; }; dec = () => { this.count--; }; render() { const style = `host * { font-size: 200%; } span { width: 4rem; display: inline-block; text-align: center; } button { width: 64px; height: 64px; border: none; border-radius: 10px; background-color: seagreen; color: white; }`; return ( {this.count} ); } } customElements.define("my-counter", MyCounterElement);