|
|
@ -16,7 +16,7 @@ export const useTheme = createGlobalState((config?: Partial<ThemeConfig>) => { |
|
|
|
/** set initial config */ |
|
|
|
/** set initial config */ |
|
|
|
setTheme(config ?? currentTheme.value) |
|
|
|
setTheme(config ?? currentTheme.value) |
|
|
|
|
|
|
|
|
|
|
|
/** set theme (persists in localstorage) */ |
|
|
|
/** set theme */ |
|
|
|
function setTheme(theme?: Partial<ThemeConfig>) { |
|
|
|
function setTheme(theme?: Partial<ThemeConfig>) { |
|
|
|
const themePrimary = theme?.primaryColor ? tinycolor(theme.primaryColor) : tinycolor(themeV2Colors['royal-blue'].DEFAULT) |
|
|
|
const themePrimary = theme?.primaryColor ? tinycolor(theme.primaryColor) : tinycolor(themeV2Colors['royal-blue'].DEFAULT) |
|
|
|
const themeAccent = theme?.accentColor ? tinycolor(theme.accentColor) : tinycolor(themeV2Colors.pink['500']) |
|
|
|
const themeAccent = theme?.accentColor ? tinycolor(theme.accentColor) : tinycolor(themeV2Colors.pink['500']) |
|
|
|