Initial checkin.
This commit is contained in:
24
my-element.ts
Normal file
24
my-element.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user