Change theme

This commit is contained in:
MD. Ariful Alam committed 2021-08-21 15:27:39 +06:00
1 parent 0229b5e453
commit e6935a32b9
13 files changed
+2563 -109

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import config from "../config";
export const getThemeValue = () => {
if (localStorage.hasOwnProperty('theme')) {
let theme = localStorage.getItem('theme');
return theme;
}
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : config.defaultTheme;
}