diff --git a/site/src/components/my-counter.js b/site/src/components/my-counter.js index 59a7f92..d107aeb 100644 --- a/site/src/components/my-counter.js +++ b/site/src/components/my-counter.js @@ -2,12 +2,8 @@ class Counter extends WebComponent { static props = { count: 0, }; - - increment() { - this.onclick = () => ++this.props.count; - } get template() { - return html``; } diff --git a/site/src/components/my-hello-world.js b/site/src/components/my-hello-world.js deleted file mode 100644 index c2c5a0c..0000000 --- a/site/src/components/my-hello-world.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Custom element using a minimal Web Component Base class - * @see https://ayco.io/n/web-component-base - */ -class MyHelloWorld extends WebComponent { - // tell browser which props to cause render - static properties = ["my-name"]; - - // Triggered when the component is connected to the DOM - onInit() { - let count = 0; - this.onclick = () => (this.props.myName = `Clicked ${++count}x`); - } - - // give readonly template - get template() { - return ``; - } -} diff --git a/site/src/components/my-quote.js b/site/src/components/my-quote.js deleted file mode 100644 index a40b01d..0000000 --- a/site/src/components/my-quote.js +++ /dev/null @@ -1,37 +0,0 @@ -class MyQuote extends WebComponent { - static properties = ["type"]; - - /** - * @type {HTMLElement} - */ - get wrapper() { - return this.querySelector("#wrapper"); - } - - afterViewInit() { - /** - * @type {Partial} - */ - const style = { - background: "#f5f2f0", - padding: "1em", - margin: "1em 0", - fontSize: "large", - overflow: "auto", - borderRadius: "5px", - }; - - Object.keys(style).forEach((rule) => { - this.wrapper.style[rule] = style[rule]; - }); - } - - get template() { - const trimmed = this.innerHTML.trim(); - return ` -
- ${trimmed} -
- `; - } -}