storybook/docs/snippets/vue/csf-2-example-starter.ts-3.ts.mdx
2023-01-06 19:15:31 +00:00

22 lines
392 B
Plaintext

```ts
// CSF 2
import { Meta, StoryFn } from '@storybook/vue3';
import Button from './Button.vue';
export default {
title: 'Button',
component: Button,
} as Meta<typeof Button>;
export const Primary: StoryFn<typeof Button> = (args) => ({
components: { Button },
setup() {
return { args };
},
template: '<Button v-bind="args" />',
});
Primary.args = { primary: true };
```