storybook/docs/snippets/vue/my-component-story-with-nonstory.js.mdx
2021-02-23 00:26:03 +00:00

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 }};
```