kickstartDS / ds-agency

https://storybook.basic.design-system.agency/
Other
2 stars 0 forks source link

Fix `Properties` / `ArgsTable` in `Docs` views not displaying array item definition #56

Open julrich opened 6 months ago

julrich commented 6 months ago

This works in Controls, but not in Docs. Example: https://github.com/kickstartDS/ds-agency/blob/main/src/components/logos/Logos.mdx#L13C13-L13C13

We should possibly be able to do something like this

<ArgTypes of={{...LogoStories, ...getArgsShared(LogoStories.parameters.jsonSchema, 'docs')}}/>

'docs' here would be a new parameter to getArgsShared, toggling a slightly different way of returning the info... suited to be displayed as a single array item definition inside Docs.

Could probably also provide those exports from existing *.stories.tsx files for conenience, and to keep the MDX files slim.