Created
May 4, 2020 18:44
-
-
Save gladchinda/a74aeabd1e16bbad7982b52425201755 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import useTheme from './useTheme'; | |
import ThemeContext from './theme'; | |
export default function App() { | |
const { theme, darkMode, inheritSystem } = useTheme(); | |
return <> | |
{/* Render the color scheme controls widget here */} | |
{/* Use `theme`, `darkMode` and `inheritSystem` as required */} | |
<ThemeContext.Provider value={theme}> | |
{/* Render rest of app (consume the theme context) */} | |
</ThemeContext.Provider> | |
</> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment