import N8nIconButton from './IconButton.vue'; import { action } from '@storybook/addon-actions'; import type { StoryFn } from '@storybook/vue3'; export default { title: 'Atoms/Icon Button', component: N8nIconButton, argTypes: { type: { control: 'select', options: ['primary', 'secondary', 'tertiary', 'success', 'warning', 'danger'], }, size: { control: { type: 'select', }, options: ['mini', 'small', 'medium', 'large', 'xlarge'], }, }, parameters: { backgrounds: { default: '--color-background-light' }, }, }; const methods = { onClick: action('click'), }; const Template: StoryFn = (args, { argTypes }) => ({ setup: () => ({ args }), props: Object.keys(argTypes), components: { N8nIconButton, }, template: '', methods, }); export const Button = Template.bind({}); Button.args = { icon: 'plus', title: 'my title', }; const ManyTemplate: StoryFn = (args, { argTypes }) => ({ setup: () => ({ args }), props: Object.keys(argTypes), components: { N8nIconButton, }, template: '
', methods, }); export const Primary = ManyTemplate.bind({}); Primary.args = { icon: 'plus', title: 'my title', type: 'primary', }; export const Outline = ManyTemplate.bind({}); Outline.args = { icon: 'plus', title: 'my title', type: 'primary', outline: true, }; export const Tertiary = ManyTemplate.bind({}); Tertiary.args = { icon: 'plus', title: 'my title', type: 'tertiary', }; export const Text = ManyTemplate.bind({}); Text.args = { icon: 'plus', title: 'my title', type: 'text', };