Skip to content
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

refactor(storybook-addon): update deps and tooling #8109

Merged
merged 2 commits into from Nov 9, 2023

Conversation

TylerAPfledderer
Copy link
Collaborator

Based on a bug found in the color mode toggle, this PR addresses the bug and updates how the decorator is created.

  • Bumps Storybook deps to latest (7.5.3)
  • Toggling state for color mode originally used Storybook's useAddonState api hook. However, this hook is not reliable to persistent allow toggling of boolean state. Replaces this hook with React's useState as this state is a primitive.
  • Makes use of the makeDecorator function to make this addon more like an official Storybook addon.
  • Removes unneeded props from the button components that were originally part of a Type error bug.

Additional context: regarding the issue with useAddonState: this was found in the Ethereum.org repo when working on their migration to NextJS. The toggle was breaking after initial change.

Copy link

changeset-bot bot commented Nov 9, 2023

🦋 Changeset detected

Latest commit: b922e0a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chakra-ui/storybook-addon Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Nov 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
chakra-ui-storybook ✅ Ready (Inspect) Visit Preview Nov 9, 2023 2:47am

@segunadebayo segunadebayo merged commit 4340dbd into main Nov 9, 2023
5 of 6 checks passed
@segunadebayo segunadebayo deleted the refactor/storybook-addon-update-tooling branch November 9, 2023 12:43
@github-actions github-actions bot mentioned this pull request Nov 9, 2023
@nimeshpoudel7
Copy link

i want to add my variant and custom style component , i tried but not working, can you help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants