OpenMediaCenter/src/GlobalInfos.js

24 lines
474 B
JavaScript
Raw Normal View History

import darktheme from "./AppDarkTheme.module.css";
import lighttheme from "./AppLightTheme.module.css";
class StaticInfos {
#darktheme = true;
2020-07-27 21:14:56 +02:00
isDarkTheme() {
2020-07-27 21:14:56 +02:00
return this.#darktheme;
};
2020-07-27 21:14:56 +02:00
enableDarkTheme(enable = true){
this.#darktheme = enable;
}
getThemeStyle(){
return this.isDarkTheme() ? darktheme : lighttheme;
}
}
const GlobalInfos = new StaticInfos();
//Object.freeze(StaticInfos);
export default GlobalInfos;