@theme-ui/color-modes
Adds support for user-controlled color modes
https://theme-ui.com
Note: This package is included in the main theme-ui
package, and
generally should not be used on its own.
npm i @theme-ui/color-modes
import { ThemeProvider } from '@theme-ui/core'
import { ColorModeProvider } from '@theme-ui/color-modes'
import theme from './theme'
export default (props) => (
<ThemeProvider theme={theme}>
<ColorModeProvider>{props.children}</ColorModeProvider>
</ThemeProvider>
)
API
useColorMode
ColorModeProvider
v0.15.5 (Tue Feb 07 2023)
:tada: This release contains work from new contributors! :tada:
Thanks for all your work!
:heart: Nischal Shakya (@Nischal2015)
:heart: Wahid Rahim (@wahidrahim)
🐛 Bug Fix
🏠 Internal
Authors: 5