UNPKG

@storybook/vue

Version:
49 lines (43 loc) 951 B
import MyButton from './Button.vue'; // More on how to set up stories at: https://storybook.js.org/docs/writing-stories export default { title: 'Example/Button', component: MyButton, tags: ['autodocs'], render: (args, { argTypes }) => ({ props: Object.keys(argTypes), components: { MyButton }, template: '<my-button @onClick="onClick" v-bind="$props" />', }), argTypes: { backgroundColor: { control: 'color' }, size: { control: { type: 'select' }, options: ['small', 'medium', 'large'], }, }, }; // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args export const Primary = { args: { primary: true, label: 'Button', }, }; export const Secondary = { args: { label: 'Button', }, }; export const Large = { args: { size: 'large', label: 'Button', }, }; export const Small = { args: { size: 'small', label: 'Button', }, };