-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
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
Emit dark mode event via addons channel #1
Comments
Make a PR 😄 So this is for rendering your story in dark mode as well? Interesting use case. I like it! Make sure to add some docs to the Readme too |
Would it make sense to also expose the ThemeWrapper decorator too? Or maybe this is too dependent upon what styles framework they use. Docs might be sufficient then |
@hipstersmoothie in our case we have custom PR ready. Not sure how to test this in the PR but I already have a fork that works |
This way we can integrate storybook dark mode with custom theme provider by creating custom decorator. We can do this by adding callback after
setState
in https://github.com/hipstersmoothie/storybook-dark-mode/blob/master/src/Tool.tsx#L37 by callingchannel.emit('DARK_MODE', isDark)
I can create the PR if you want
Example usage
The text was updated successfully, but these errors were encountered: