Compare commits

...

6 Commits

Author SHA1 Message Date
64a3f57813 1.0.70 2020-11-24 20:57:42 +00:00
1315e8c3f6 fix(core): update 2020-11-24 20:57:41 +00:00
d059862841 1.0.69 2020-11-24 19:48:14 +00:00
ad34affb9e fix(core): update 2020-11-24 19:48:14 +00:00
011b3fb76a 1.0.68 2020-11-24 19:23:07 +00:00
47099d02b5 fix(core): update 2020-11-24 19:23:06 +00:00
4 changed files with 18 additions and 8 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-domtools",
"version": "1.0.67",
"version": "1.0.70",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-domtools",
"version": "1.0.67",
"version": "1.0.70",
"private": false,
"description": "tools to simplify complex css structures",
"main": "dist_ts/index.js",

View File

@ -5,7 +5,7 @@ import * as plugins from './domtools.plugins';
export class ThemeManager {
public domtoolsRef: DomTools;
goBrightBoolean = false;
public goBrightBoolean = false;
constructor(domtoolsRefArg: DomTools) {
this.domtoolsRef = domtoolsRefArg;
@ -21,15 +21,24 @@ export class ThemeManager {
}
}
public goBright() {
private async updateAllConnectedElements() {
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
await this.setThemeStatusForElement(elementArg, true);
await this.setThemeStatusForElement(elementArg, this.goBrightBoolean);
});
}
public goBright() {
this.goBrightBoolean = true;
this.updateAllConnectedElements();
}
public goDark() {
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
await this.setThemeStatusForElement(elementArg, false);
});
this.goBrightBoolean = false;
this.updateAllConnectedElements();
}
public toggleDarkBright() {
this.goBrightBoolean = !this.goBrightBoolean;
this.updateAllConnectedElements();
}
}

View File

@ -10,6 +10,7 @@ import { html, LitElement } from 'lit-element';
export const styles = html`
<style>
* {
transition: background 0.2s, color 0.1s;
font-family: 'Roboto', sans-serif;
box-sizing: border-box;
}