Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
011b3fb76a | |||
47099d02b5 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-domtools",
|
||||
"version": "1.0.67",
|
||||
"version": "1.0.68",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-domtools",
|
||||
"version": "1.0.67",
|
||||
"version": "1.0.68",
|
||||
"private": false,
|
||||
"description": "tools to simplify complex css structures",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user