Skip to content

Commit

Permalink
Fix prefers-color-scheme not working
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed May 31, 2019
1 parent c3590db commit 4b2affd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/modules/components/ThemeContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4b2affd

Please sign in to comment.