Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
8390ba67b3 | |||
d5872511b8 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-element",
|
"name": "@designestate/dees-element",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-element",
|
"name": "@designestate/dees-element",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a custom element class extending lit element class",
|
"description": "a custom element class extending lit element class",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
18
ts/index.ts
18
ts/index.ts
@ -7,20 +7,32 @@ export {
|
|||||||
TemplateResult,
|
TemplateResult,
|
||||||
internalProperty,
|
internalProperty,
|
||||||
css,
|
css,
|
||||||
unsafeCSS
|
unsafeCSS,
|
||||||
} from 'lit-element';
|
} from 'lit-element';
|
||||||
|
|
||||||
export class DeesElement extends plugins.litElement.LitElement {
|
export class DeesElement extends plugins.litElement.LitElement {
|
||||||
@plugins.litElement.property({type: Boolean})
|
@plugins.litElement.property({ type: Boolean })
|
||||||
public goBright: boolean = false;
|
public goBright: boolean = false;
|
||||||
|
|
||||||
|
// domtools
|
||||||
public domtoolsPromise = plugins.domtools.elementBasic.setup(this);
|
public domtoolsPromise = plugins.domtools.elementBasic.setup(this);
|
||||||
|
|
||||||
|
@plugins.litElement.property()
|
||||||
|
domtools?: plugins.domtools.DomTools;
|
||||||
|
|
||||||
private themeSubscription: plugins.smartrx.rxjs.Subscription;
|
private themeSubscription: plugins.smartrx.rxjs.Subscription;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.domtoolsPromise.then((domtoolsArg) => {
|
||||||
|
this.domtools = domtoolsArg;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public connectedCallback() {
|
public connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
this.domtoolsPromise.then(async (domtools) => {
|
this.domtoolsPromise.then(async (domtools) => {
|
||||||
this.themeSubscription = domtools.themeManager.themeObservable.subscribe(goBrightArg => {
|
this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
|
||||||
this.goBright = goBrightArg;
|
this.goBright = goBrightArg;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user