diff --git a/docs/src/modules/components/ThemeContext.js b/docs/src/modules/components/ThemeContext.js index a5c524189a72bf..c050426c99c3c8 100644 --- a/docs/src/modules/components/ThemeContext.js +++ b/docs/src/modules/components/ThemeContext.js @@ -49,7 +49,7 @@ export function Provider(props) { } }, themeInitialOptions); - const prefersDarkMode = useMediaQuery('prefers-color-scheme: dark'); + const prefersDarkMode = useMediaQuery('@media (prefers-color-scheme: dark)'); const preferredType = prefersDarkMode ? 'dark' : 'light'; const { direction, paletteColors, paletteType = preferredType } = themeOptions;