Files
exploRUGComponent/my-element.ts
2019-12-03 17:05:21 -08:00

25 lines
389 B
TypeScript

import { LitElement, html, customElement, property } from 'lit-element';
@customElement('my-element')
class MyElement extends LitElement {
@property({type: String})
name = 'World';
constructor() {
super();
}
render(){
return html`
<p>Hello, ${this.name}!</p>
`;
}
}
declare global {
interface HTMLElementTagNameMap {
'my-element': MyElement;
}
}