mirror of
https://github.com/go-gost/gost-ui.git
synced 2024-08-11 17:53:29 +00:00
fix: theme
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
font-weight: 400;
|
||||
color-scheme: light dark;
|
||||
font-synthesis: none;
|
||||
background-color: #FFF;
|
||||
/* text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-text-size-adjust: 100%; */
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
:root.theme-dark {
|
||||
|
||||
@@ -22,7 +22,8 @@ export const useIsDark = ()=> {
|
||||
const sysIsDark = useSysIsDark();
|
||||
const { theme: userTheme } = useSettings();
|
||||
const isDark = useMemo(() => {
|
||||
if (userTheme === "system") {
|
||||
console.log('useIsDark')
|
||||
if (!userTheme || userTheme === "system") {
|
||||
return sysIsDark;
|
||||
} else {
|
||||
return userTheme === "dark" ? true : false;
|
||||
|
||||
Reference in New Issue
Block a user