-
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
Storybook: Make sure that subcomponents are properly documented #53541
Comments
If the subcomponents are included as the parent's story, then it won't make sense if someone visits its story page, eg:AlignmentMatrix.Icon has the main component controls only
I think this suggestion make sense, and the sidebar layout can be like Another approach is customize the |
Yes, I think this is the way to go.
I wasn't aware of this thing, thanks. I tried it out in #53751 but realized it would remove the Controls from the Docs pages. I'm a bit hesitant to go through with this now, because I feel like it would be worse for the overall developer experience 😅 |
FYI, you will need the prop
or import PRIMARY_STORY from
Found similar usage in equinor/design-system, they used a PropsTable in mdx stories. Example Navigation-tabs stories |
@bangank36 It worked 😱 #53751 |
💯 |
You're right, I was just reading the v6 to v7 migration docs and got them mixed up 🤦 |
Storybook 7 (#53520) does not support the display of subcomponents in the props tables, so they had to be removed.
We should go through the affected components and make sure that they are appropriately documented in some way or another. Simple subcomponents may be sufficiently documented just as a story of the parent component (e.g.
DropdownContentWrapper
). More complex subcomponents may warrant their own story pages. Maybe there are other ways as well.Affected subcomponents
The text was updated successfully, but these errors were encountered: