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

20 lines
369 B
Plaintext

```js
// MyComponent.stories.js
import MyComponent from './MyComponent.vue';
export default {
title: 'Path/To/MyComponent',
component: MyComponent,
};
export const Basic = () => ({
components: { MyComponent },
template: '<MyComponent />',
});
export const WithProp = () => ({
components: { MyComponent },
template: '<MyComponent prop="value"/>',
});
```