mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
45 lines
647 B
Plaintext
45 lines
647 B
Plaintext
```md
|
|
<!--- YourComponent.stories.mdx -->
|
|
|
|
import { Story } from '@storybook/addon-docs';
|
|
|
|
<Story
|
|
name="Array Include"
|
|
parameters={{
|
|
controls: {
|
|
include: ['foo', 'bar']
|
|
}
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
|
|
<Story
|
|
name="Regex Include"
|
|
parameters={{
|
|
controls: { include:
|
|
/^hello*/
|
|
}
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
|
|
<Story
|
|
name="Array Exclude"
|
|
parameters={{
|
|
controls: {
|
|
exclude: ['foo', 'bar']
|
|
}
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
|
|
<Story
|
|
name="Regex Exclude"
|
|
parameters={{
|
|
controls: {
|
|
exclude: /^hello*/
|
|
}
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
``` |