Addon-Docs:Custom Props table
See original GitHub issueIs your feature request related to a problem? Please describe. No
Describe the solution you’d like I can pass a parameter to control the props table,
- Pass a array to define which item should we display
- Can use custom item name, like I want to display Chinese
th
like['姓名', '类型', '默认值','描述']
but not['name', 'type', 'default', 'description']
So I want to display name, type, default, description
when I pass a parameter
[
{
key: 'name',
label: '姓名',
},
{
key: 'type',
label: '类型',
},
{
key: 'default',
label: '默认值',
},
{
key: 'description',
label: '描述',
}
]
Are you able to assist bring the feature to reality?
Seems it really a feature need to add -_-, I really want to do contribution
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
ArgsTable - Storybook - JS.ORG
Storybook Docs automatically generates component args tables for components in ... { ArgsTable } from '@storybook/addon-docs'; import { MyComponent } from '.
Read more >storybook/addon-docs
DocsPage is a zero-config aggregation of your component stories, text descriptions, docgen comments, props tables, and code examples into ...
Read more >Storybook Docs with mdx support and addon knobs
In the component's mdx page, I give examples of the component. Prop Tables. Prop tables on the documentation pages are much improved. These...
Read more >Storybook: addons/docs/docs/props-tables.md
To use the props table in MDX, use the ArgsTable block: // MyComponent.stories.mdx import { ArgsTable } from '@storybook/addon-docs'; import { MyComponent } ......
Read more >Compare DocsPage and MDX syntax in Storybook with ...
card.stories.mdx --> import { Meta } from '@storybook/addon-docs/blocks'; ... Although our Card component has default values for its props , on initial ...
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 FreeTop 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
Top GitHub Comments
@shilman How can this customizations be applied to subcomponents used in story?
This works great for the main component’s props table, but when I have multiple subcomponents with their own props table, I can’t figure out how to configure those props tables. I’m talking about this:
I need to add some custom
type
values to some of those subcomponents. Can it be done with the current APIs available?Thanks!
@Smolations good news. 6.0 props are super configurable, using a completely different mechanism. Will try to get your use case across when I write that part of the documentation.