import { Meta, Story } from "@storybook/angular"; import { ButtonComponent } from "./button.component"; export default { title: "Component Library/Button", component: ButtonComponent, args: { buttonType: "primary", disabled: false, loading: false, }, parameters: { design: { type: "figma", url: "https://www.figma.com/file/Zt3YSeb6E6lebAffrNLa0h/Tailwind-Component-Library?node-id=5115%3A26950", }, }, } as Meta; const Template: Story = (args: ButtonComponent) => ({ props: args, template: ` Link `, }); export const Primary = Template.bind({}); Primary.args = { buttonType: "primary", }; export const Secondary = Template.bind({}); Secondary.args = { buttonType: "secondary", }; export const Danger = Template.bind({}); Danger.args = { buttonType: "danger", }; const AllStylesTemplate: Story = (args) => ({ props: args, template: ` `, }); export const Loading = AllStylesTemplate.bind({}); Loading.args = { disabled: false, loading: true, }; export const Disabled = AllStylesTemplate.bind({}); Disabled.args = { disabled: true, loading: false, }; const DisabledWithAttributeTemplate: Story = (args) => ({ props: args, template: ` `, }); export const DisabledWithAttribute = DisabledWithAttributeTemplate.bind({}); DisabledWithAttribute.args = { disabled: true, loading: false, }; const BlockTemplate: Story = (args: ButtonComponent) => ({ props: args, template: ` [block]="true" Link block Link `, }); export const Block = BlockTemplate.bind({}); Block.args = { block: true, };