-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
components: Remove @emotion/css
from Divider
#33054
Conversation
Size Change: +460 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
9b967ef
to
548e6d6
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.
The Storybook story seems to have some hiccups.
- When setting a value to one of the margin knobs, an error is printed to the console
- Another error is also printed when deleting/unsetting a value for the margin knobs
- If the
margin
,marginTop
andmarginBottom
values are all set, themarginTop
andmarginBottom
values get ignored (as expected). But when themargin
value is unset, themarginTop
andmarginBottom
values seem to be ignored
divider-storybook.mp4
I think all these issues come from storybook knobs defaulting to |
Yeah so the issue is that storybook's knobs are going from controlled to uncontrolled if we default the value to |
Although I'll add that I'm reluctant to change the code in the component to make the story work, it seems odd to do so. Maybe we should have two separate stories, one for just Actually yes I think that's the right answer. I'll update the story like so. |
Thank you for the explanation! Now that I remember, I did incur a similar/related problem when working on the Card component, and I solved it by using the |
Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
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.
All feedback has been addressed and the storybook stories now work as expected.
LGTM 🚀
Description
Part of #30503 (comment)
I also updated the story so that it's easier to test.
How has this been tested?
Storybook, everything all the props etc should all work as they worked before (aside from the additional storybook knobs)
Types of changes
Non breaking change
Checklist:
*.native.js
files for terms that need renaming or removal).