mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
37 lines
615 B
Plaintext
37 lines
615 B
Plaintext
```ts
|
|
// YourComponent.stories.ts
|
|
|
|
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
|
|
const meta: Meta = {
|
|
component: 'your-component',
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj;
|
|
|
|
export const ArrayInclude: Story = {
|
|
parameters: {
|
|
controls: { include: ['foo', 'bar'] },
|
|
},
|
|
};
|
|
|
|
export const RegexInclude: Story = {
|
|
parameters: {
|
|
controls: { include: /^hello*/ },
|
|
},
|
|
};
|
|
|
|
export const ArrayExclude: Story = {
|
|
parameters: {
|
|
controls: { exclude: ['foo', 'bar'] },
|
|
},
|
|
};
|
|
|
|
export const RegexExclude: Story = {
|
|
parameters: {
|
|
controls: { exclude: /^hello*/ },
|
|
},
|
|
};
|
|
```
|