astro/examples/framework-lit/src/components/calc-add.js

18 lines
275 B
JavaScript
Raw Normal View History

import { LitElement, html } from 'lit';
export class CalcAdd extends LitElement {
2021-12-22 21:11:05 +00:00
static get properties() {
return {
num: {
type: Number,
},
};
}
2021-12-22 21:11:05 +00:00
render() {
return html` <div>Number: ${this.num}</div> `;
}
}
customElements.define('calc-add', CalcAdd);