mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 07:11:13 +08:00
16 lines
448 B
Plaintext
16 lines
448 B
Plaintext
```js
|
|
// MyComponent.stories.js
|
|
|
|
import MyComponent from './MyComponent.vue';
|
|
import someData from './data.json';
|
|
|
|
export default {
|
|
title: 'MyComponent',
|
|
component: MyComponent,
|
|
includeStories: ['SimpleStory', 'ComplexStory'],
|
|
excludeStories: /.*Data$/, // 👈 Storybook ignores anything that contains Data
|
|
}
|
|
|
|
export const simpleData = { foo: 1, bar: 'baz' };
|
|
export const complexData = { foo: 1, foobar:{ bar: 'baz', baz: someData }};
|
|
``` |