diff --git a/package.json b/package.json index 44b8d19..18f96c9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@atatctech/mui-theme", "type": "module", - "version": "1.0.8", + "version": "1.0.9", "author": "ATATC", "description": "The ultimate dynamic theme-switching solution for MUI that adapts to SSR.", "keywords": [ diff --git a/src/theme.js b/src/theme.js index 0e2372e..37273f1 100644 --- a/src/theme.js +++ b/src/theme.js @@ -7,7 +7,7 @@ export function Theme(props) { const systemThemeMode = useSystemThemeMode(); const themeMode = props.themeMode == null ? systemThemeMode : requireStrictThemeMode(props.themeMode, systemThemeMode); const themeConfig = props.themeConfig == null ? defaultThemeConfig : props.themeConfig; - const theme = useMemo(() => createTheme(themeConfig(themeMode)), [themeConfig]); + const theme = useMemo(() => createTheme(themeConfig(themeMode)), [themeMode]); return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(CssBaseline, {}), props.children] })); } //# sourceMappingURL=theme.js.map \ No newline at end of file diff --git a/src/theme.js.map b/src/theme.js.map index 27517a6..07662ab 100644 --- a/src/theme.js.map +++ b/src/theme.js.map @@ -1 +1 @@ -{"version":3,"file":"theme.js","sourceRoot":"","sources":["theme.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,sBAAsB,EAAE,kBAAkB,EAAC,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAY,OAAO,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,kBAAkB,EAAC,MAAM,WAAW,CAAC;AAE7C,MAAM,UAAU,KAAK,CAAC,KAA+G;IACjI,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IACvH,MAAM,WAAW,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AW,KAAE,EACb,KAAK,CAAC,QAAQ,IACH,CACnB,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/src/theme.tsx b/src/theme.tsx index 44e751e..4470a98 100644 --- a/src/theme.tsx +++ b/src/theme.tsx @@ -8,7 +8,7 @@ export function Theme(props: {readonly themeMode?: StrictThemeMode, readonly the const systemThemeMode = useSystemThemeMode(); const themeMode = props.themeMode == null ? systemThemeMode : requireStrictThemeMode(props.themeMode, systemThemeMode); const themeConfig = props.themeConfig == null ? defaultThemeConfig : props.themeConfig; - const theme = useMemo(() => createTheme(themeConfig(themeMode)), [themeConfig]); + const theme = useMemo(() => createTheme(themeConfig(themeMode)), [themeMode]); return (