mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-11-25 15:29:54 +00:00
Change theme
This commit is contained in:
1 parent
0229b5e453
commit
e6935a32b9
13 files changed
+2563
-109
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user