[feature] Add a storybook theme switcher to the Toolbar for Chakra UI #11863
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a button to the storybook toolbar that enables to switch between dark and light color mode in Chakra UI:
Actually i've been searching a solution how to do this for quite some time as i never got the official
@chakra-ui/storybook-addon
to work – and as it relies on webpack it won't ever work with the storybook+vite default since Redwood 8.Thanks heaps to @simoncrypta for contributing the i18n language switcher, which ultimately pointed me in the right direction when i looked at the preview.tsx template for that.