fix(core): update
This commit is contained in:
@ -1,11 +1,43 @@
|
||||
import { DeesElement, customElement, TemplateResult, html } from '@designestate/dees-element';
|
||||
import {
|
||||
DeesElement,
|
||||
customElement,
|
||||
TemplateResult,
|
||||
html,
|
||||
property,
|
||||
} from '@designestate/dees-element';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
enum ETestEnum {
|
||||
'first' = 'first',
|
||||
'second' = 'second',
|
||||
'awesome' = 'awesome',
|
||||
}
|
||||
|
||||
@customElement('test-demoelement')
|
||||
export class TestDemoelement extends DeesElement {
|
||||
public static demo = () => html`<test-demoelement></test-demoelement>`;
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
})
|
||||
public demoBoolean = false;
|
||||
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
public demoString = 'default demo string';
|
||||
|
||||
@property({
|
||||
type: Number,
|
||||
})
|
||||
public demoNumber = 2;
|
||||
|
||||
@property({
|
||||
type: ETestEnum,
|
||||
})
|
||||
public demoENum: ETestEnum = ETestEnum.first;
|
||||
|
||||
public render() {
|
||||
return html`
|
||||
<style>
|
||||
@ -28,10 +60,19 @@ export class TestDemoelement extends DeesElement {
|
||||
border-radius: 50px;
|
||||
}
|
||||
`)}
|
||||
pre b {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<div class="maincontainer"><slot>This is a demo element</slot></div>
|
||||
<div class="themeindicator">
|
||||
You have selected the ${this.goBright ? 'bright' : 'dark'} theme;
|
||||
You have selected the ${this.goBright ? 'bright' : 'dark'} theme.
|
||||
<pre>
|
||||
demoBoolean is <b>"${this.demoBoolean}"</b>
|
||||
demoString is <b>"${this.demoString}"</b>
|
||||
demoNumber is <b>"${this.demoNumber}"</b>
|
||||
demoEnum is <b>"${this.demoENum}"</b>
|
||||
</pre>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user