1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Adding theme class name flag into #app

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2020-08-21 09:25:31 +03:00
parent 19e9cc3799
commit 11375f737e

View File

@ -93,6 +93,9 @@ export class ThemeStore {
return `--${cssName}: ${color} !important;`
});
this.styles.textContent = `:root {\n${cssVars.join("\n")}}`;
// Adding universal theme flag which can be used in component styles
const rootElem = document.getElementById("app");
rootElem.classList.toggle("theme-light", theme.type === ThemeType.LIGHT);
}
}