-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10464 from storybookjs/8781-props-include-exclude
Addon-docs: Provide better props include/exclude features
- Loading branch information
Showing
2 changed files
with
50 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
examples/official-storybook/stories/addon-docs/props-include-exclude.stories.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Props, Meta } from '@storybook/addon-docs/blocks'; | ||
import { DocgenButton } from '../../components/DocgenButton'; | ||
|
||
<Meta title="Addons/Docs/IncludeExclude" /> | ||
|
||
## Include | ||
|
||
### Array | ||
|
||
<Props of={DocgenButton} include={['disabled', 'label']} /> | ||
|
||
### Regex | ||
|
||
<Props of={DocgenButton} include={/^o.*/} /> | ||
|
||
## Exclude | ||
|
||
### Regex | ||
|
||
<Props of={DocgenButton} exclude={/^o.*|^...$/} /> | ||
|
||
## Mixed | ||
|
||
<Props of={DocgenButton} include={/^o.*/} exclude={['one', 'obj']} /> |