$ cnpm install @theme-ui/color-modes
Adds support for user-controlled color modes
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>
)
useColorModeColorModeProviderCopyright 2013 - present © cnpmjs.org | Home |