When my sub component is totally separate i see a tab rendered with the correct prop table. ✅
export default {
title: 'UI/Elements/Accordion',
component: Accordion,
subcomponents: { AccordionItem },
}
However, if i use the popular namespace pattern: ❌
export default {
title: 'UI/Elements/Accordion',
component: Accordion,
subcomponents: { 'Accordion.Item': Accordion.Item },
}
I see No props found for this component
@sami616 any idea whether this worked in earlier betas? cc @hipstersmoothie
@shilman sorry i have no idea!
Are your components written in typescript or javascript? @sami616
@hipstersmoothie TypeScript!
So this isn't currently supported but I just opened a PR to fix it 🎉
https://github.com/styleguidist/react-docgen-typescript/pull/265
Using subcomponents: { 'Accordion.Item': Accordion.Item } worked perfectly for me with my setup.
However, when using stories with args, the subcomponents property seems to be completely ignored. If I remove the args from the story, subcomponents prop tables are displayed correctly.
@alexbchr will fix in https://github.com/storybookjs/storybook/issues/10958
Oh nice searched for this issue and found this one instead! Thanks for the info!
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Closing. I think this was fixed in #10958. If not, please let me know!
Most helpful comment
So this isn't currently supported but I just opened a PR to fix it 🎉
https://github.com/styleguidist/react-docgen-typescript/pull/265