fbredius/storybook

View on GitHub
docs/snippets/vue/your-component.mdx-3.mdx.mdx

Summary

Maintainability
Test Coverage
```md
<!-- YourComponent.stories.mdx -->

import { Meta, Story } from '@storybook/addon-docs';

import YourComponent from './YourComponent.vue';

<!--๐Ÿ‘‡ The title prop determines where your story goes in the story list -->
<Meta title="YourComponent" component={YourComponent} />

<!--๐Ÿ‘‡ We create a โ€œtemplateโ€ of how args map to rendering -->
export const Template = (args) => ({
  components: { YourComponent },
  setup() {
    return { args };
  },
  template: `<YourComponent v-bind="args" />`,
});

<!-- ๐Ÿ‘‡ The args you need here will depend on your component -->
<Story
  name="FirstStory"
  args={{}}>
  {Template.bind({})}
</Story>
```