mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 22:21:47 +08:00
34 lines
602 B
Plaintext
34 lines
602 B
Plaintext
```js
|
|
// YourComponent.stories.js | YourComponent.stories.jsx | YourComponent.stories.ts | YourComponent.stories.tsx
|
|
|
|
import { YourComponent } from './YourComponent';
|
|
|
|
export default {
|
|
component: YourComponent,
|
|
};
|
|
|
|
export const ArrayInclude = {
|
|
parameters: {
|
|
controls: { include: ['foo', 'bar'] },
|
|
},
|
|
};
|
|
|
|
export const RegexInclude = {
|
|
parameters: {
|
|
controls: { include: /^hello*/ },
|
|
},
|
|
};
|
|
|
|
export const ArrayExclude = {
|
|
parameters: {
|
|
controls: { exclude: ['foo', 'bar'] },
|
|
},
|
|
};
|
|
|
|
export const RegexExclude = {
|
|
parameters: {
|
|
controls: { exclude: /^hello*/ },
|
|
},
|
|
};
|
|
```
|