addon-docs: Allow setting `argTypes` for `subcomponents`
See original GitHub issueIs your feature request related to a problem? Please describe
I have a situation where I want to use subcomponents but I need to be able to customize some of the values displayed in the generated table. As far as I can tell, I can only apply argTypes customization to the main component, not the subcomponent.
Describe the solution you’d like
A method of setting argTypes for subcomponents. I’m not sure what the best config structure would be for this, and am open to suggestions.
Describe alternatives you’ve considered N/A
Are you able to assist to bring the feature to reality? Yes, with pointers on where the relevant code is.
Additional context N/A
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:6 (1 by maintainers)
Top Results From Across the Web
ArgTypes - Storybook - JS.ORG
By specifying the type of an arg, you constrain the values that it can take and provide information about args that are not...
Read more >Addon Docs subcomponents support for sub ... - Issuehunt
What I really fail now to figure out, is where am I supposed to get the argTypes for the sub components to render...
Read more >@storybook/addon-controls - npm
module.exports = { addons: [ '@storybook/addon-docs' ... Note: If you set a component for your stories, these argTypes will always be added ...
Read more >storybook: Using argtypes in mdx does not have control
Badge.stories.mdx ---> import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks'; import Badge from '.
Read more >Documenting design systems with Storybook Docs
With that, let's dive in to some basic terminology and examples on ... import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

How about
And in case we don’t want to add manual
argTypesit will be left as in today -Anyone know of a workaround for this? I find it incredible that
argTablesis considered a first-class citizen but there’s no support for it on subcomponents.