-
Notifications
You must be signed in to change notification settings - Fork 42
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
docs: add appearance control to toast story #894
Conversation
Uffizzi Preview Environment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it works in the preview PR!
6666899
to
b58da67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice very clean implementation. Glad you've introduced this pattern to disable controls for specific stories and we can use it elsewhere.
c63df4b
to
9ada95c
Compare
5155fa2
to
a3aed4e
Compare
a3aed4e
to
f61ea92
Compare
Uffizzi Preview |
Description
This PR adds an appearance control to the Toaster story. Since the Toast story needs both the Toaster and Toast component, we had to add the Toaster component as a decorator in order to get the appearance control to work properly. However, it only works for the stories that have the Toast component(s) as a direct child/children of the Toaster component (or wrapped in a fragment). It does not work for the stories where there's maps or the Toast component is in an array.
Since the appearance control will only work on some of the stories, I've installed the @storybook/addon-controls package so that I can disable controls on the stories which the appearance control will not work.
Which issue(s) does this PR relate to?
Testing
Go to the Toaster story in story book and confirm that you can change the appearance control for Default, Description, and Multi Toast story. Also confirm that you can not use the controls for the rest of the stories.
Trade-offs
Screenshots
Checklist