We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prefers-color-scheme
Wrapping an Electron app with <RUIProvider> does not load the user-preferred color scheme. Doing it manually does work, however:
<RUIProvider>
export default function App() { const prefersColorScheme = window.matchMedia('(prefers-color-scheme: dark)'); return ( <RUIProvider theme={prefersColorScheme?.matches ? 'dark' : 'light'}> <ThemeProvider theme={{}}> <Router> <Routes> ... </Routes> </Router> </ThemeProvider> </RUIProvider> ); }
The text was updated successfully, but these errors were encountered:
system
export default function App() { const prefersColorScheme = window.matchMedia('(prefers-color-scheme: dark)'); const theme = React.useMemo(() => ({ mode: prefersColorScheme?.matches ? 'dark' : 'light' }), [prefersColorScheme]);
return ( ... ); }
Sorry, something went wrong.
<ThemeProvider theme={{}}> <Router> <Routes> ... </Routes> </Router> </ThemeProvider> </RUIProvider>
No branches or pull requests
Wrapping an Electron app with
<RUIProvider>
does not load the user-preferred color scheme. Doing it manually does work, however:The text was updated successfully, but these errors were encountered: