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

Advice/Feature Request - Doc prop types for multiple components #8640

Closed
dcods22 opened this issue Oct 30, 2019 · 1 comment
Closed

Advice/Feature Request - Doc prop types for multiple components #8640

dcods22 opened this issue Oct 30, 2019 · 1 comment

Comments

@dcods22
Copy link

dcods22 commented Oct 30, 2019

Is your feature request related to a problem? Please describe.
When using the docs feature instead of the addon-info, we have sub components in one story that have different prop types but need to be self contained into one story since they cannot exist without eachout. For Example, our Accordion is broken up into a header and body.

<Accordion>
 <Header>Click me</Header>
 <Body>Show me</Body>
</Accordion>

When we put this in a story only the table shows for the Accordion but we want to also display the props and types of them for Header and Body. Im not sure if this exists currently but I couldnt find an example or documentation on this.

image

Describe the solution you'd like
Ideally there would be a way to pass additional components to be documented outside of the export default { title: "Accordion", component: Accordion}; So that I could add components in specific stories to display or at the top for this accordion one to display for each of the children components.

Describe alternatives you've considered
We currently use addon-info which provides this functionality. We are using CSF now that we converted from storiesOf

Are you able to assist bring the feature to reality?
Possibly depending on the solution

Additional context
We have multiple use cases for this so this would prevent us from converting to docs which we would ideally like to do based on our discussion with Chromatic.

@shilman
Copy link
Member

shilman commented Oct 30, 2019

I agree. This will be coming to docs, hopefully in 5.3! Closing as a duplicate to #7811

@shilman shilman closed this as completed Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants