storybook/docs/snippets/vue/button-story-rename-story.3.ts.mdx

23 lines
586 B
Plaintext

```ts
// Button.stories.ts
import Button from './Button.vue';
import { ComponentMeta, ComponentStory } from '@storybook/vue3';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/vue/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
} as ComponentMeta<typeof Button>;
export const Primary: ComponentStory<typeof Button> = () => ({
components: { Button },
template: '<Button primary label="Button" />',
});
Primary.storyName = 'I am the primary';
```