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
It is not clear from the documentation how to add decorators to history. Tell me how to implement it correctly.
const ThemeContext = React.createContext({}) const DarkTheme = { dark: true, colors: { primary: '#FF06F4', background: '#1c1c1c', card: 'rgb(255, 255, 255)', text: '#FFFF', border: 'rgb(199, 199, 204)', notification: 'rgb(255, 69, 58)' } } const LightTheme = { dark: false, colors: { primary: '#FF06F4', background: '#FFF', card: 'rgb(255, 255, 255)', text: '#1c1c1c', border: 'rgb(199, 199, 204)', notification: 'rgb(255, 69, 58)' } } // create a component that uses the dark mode hook function ThemeWrapper(props) { // render your custom theme provider console.log(`useDarkMode()`, useDarkMode()) return ( <ThemeContext.Provider value={useDarkMode() ? DarkTheme : LightTheme}> {props.children} </ThemeContext.Provider> ); } storiesOf('Txt', module .addDecorator((renderStory) => <ThemeWrapper>{renderStory()}</ThemeWrapper>)
)
The text was updated successfully, but these errors were encountered:
I personally don't use react native. But if somebody figures this out please submit a PR!
Sorry, something went wrong.
No branches or pull requests
It is not clear from the documentation how to add decorators to history. Tell me how to implement it correctly.
)
The text was updated successfully, but these errors were encountered: