Files
OpenMediaCenter/src/GlobalInfos.js
T

24 lines
474 B
JavaScript
Raw Normal View History

2020-08-03 23:31:43 +00:00
import darktheme from "./AppDarkTheme.module.css";
import lighttheme from "./AppLightTheme.module.css";
class GlobalInfos {
2020-07-28 18:17:17 +02:00
#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;
}
2020-08-03 23:31:43 +00:00
getThemeStyle(){
return this.isDarkTheme() ? darktheme : lighttheme;
}
}
const StaticInfos = new GlobalInfos();
2020-07-28 18:17:17 +02:00
//Object.freeze(StaticInfos);
export default StaticInfos;