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