import { ComponentMeta, ComponentStory } from "@storybook/react"; import { Trash2 } from "react-feather"; import { Button as ButtonComponent } from "@calcom/ui/v2"; export default { title: "Button", component: ButtonComponent, argTypes: { color: { options: ["primary", "secondary", "minimal", "destructive"], control: { type: "select" }, }, disabled: { options: [true, false], control: { type: "boolean" }, }, loading: { options: [true, false], control: { type: "boolean" }, }, size: { options: ["base", "lg", "icon"], control: { type: "radio" }, }, }, } as ComponentMeta; const Template: ComponentStory = (args) => ; export const All = () => (

Primary

Button Text Button Text

Secondary

Button Text Button Text

Minimal

Button Text Button Text

Destructive

Tooltip

); export const Button = Template.bind({}); Button.args = { color: "primary", children: "Button Text", }; export const Disabled = Template.bind({}); Disabled.args = { ...Button.args, disabled: true, }; export const Loading = Template.bind({}); Loading.args = { ...Button.args, loading: true, }; export const Icon = Template.bind({}); Icon.args = { color: "secondary", StartIcon: Trash2, size: "icon", };