fix(core): update

This commit is contained in:
2021-04-01 19:09:57 +00:00
parent 71e885f3e4
commit a812a12c10
7 changed files with 1714 additions and 933 deletions

View File

@ -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>
`;
}