use localstorage overrides for colors

This commit is contained in:
Mutasem 2021-11-01 13:37:16 +01:00
parent 3f7d03c65e
commit e18b0fe355

View file

@ -15,6 +15,11 @@ export function getAppNameFromCredType(name: string) {
} }
export function getStyleTokenValue(name: string) { export function getStyleTokenValue(name: string) {
if (window.localStorage.getItem(name)) {
return window.localStorage.getItem(name);
}
const style = getComputedStyle(document.body); const style = getComputedStyle(document.body);
return style.getPropertyValue(name); const value = style.getPropertyValue(name);
window.localStorage.setItem(name, value);
return value;
} }