-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestcontrol.js
More file actions
42 lines (37 loc) · 957 Bytes
/
testcontrol.js
File metadata and controls
42 lines (37 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { html,LitElement} from 'https://cdn.jsdelivr.net/gh/lit/dist@2/all/lit-all.min.js';
// define the component
export class HelloWorld extends LitElement {
static properties = {
who: {type: String},
};
// return a promise for contract changes.
static getMetaConfig() {
return {
controlName: 'Hello World',
fallbackDisableSubmit: false,
version: '1.2',
properties: {
who: {
type: 'string',
title: 'Who',
description: 'Who to say hello to'
},
me: {
type: 'string',
title: 'me',
description: 'Who to say hello to'
}
}
};
}
constructor() {
super();
this.who = 'World';
}
render() {
return html`<p>Hello ${this.who}<p/>`;
}
}
// registering the web component
const elementName = 'hello-world';
customElements.define(elementName, HelloWorld);