astro/examples/framework-lit/src/components/Test.js
Matthew Phillips 48851c9d25
Adds support for a Lit renderer (#665)
* Adds support for a Lit renderer

This adds `@astrojs/renderer-lit`. An experimental Lit renderer.

* Removed cached submodule, mistake

* Prevent globals clobbering

* Add docs on globals
2021-07-13 08:27:40 -04:00

21 lines
No EOL
328 B
JavaScript

import { LitElement, html } from 'lit';
export const tagName = 'calc-add';
class CalcAdd extends LitElement {
static get properties() {
return {
num: {
type: Number
}
};
}
render() {
return html`
<div>Number: ${this.num}</div>
`;
}
}
customElements.define(tagName, CalcAdd);