import type { Meta, StoryObj } from "@storybook/react"; import { Button } from "~/components/ui/button"; const meta: Meta = { title: "UI / Buttons / Button", component: Button, tags: ["autodocs"], argTypes: { variant: { control: { type: "select" }, options: ["default", "destructive", "outline", "secondary", "ghost", "link"], }, size: { control: { type: "inline-radio" }, options: ["xs", "sm", "default", "lg", "icon"] }, isLoading: { control: "boolean" }, disabled: { control: "boolean" }, }, args: { variant: "default", size: "default", isLoading: false, disabled: false, children: "Save changes", }, }; export default meta; type Story = StoryObj; export const Primary: Story = {}; export const Destructive: Story = { args: { variant: "destructive", children: "Delete account" } }; export const Outline: Story = { args: { variant: "outline", children: "Cancel" } }; export const Secondary: Story = { args: { variant: "secondary", children: "Secondary action" } }; export const Ghost: Story = { args: { variant: "ghost", children: "Dismiss" } }; export const LinkLike: Story = { args: { variant: "link", children: "Read the docs" } }; export const Loading: Story = { args: { isLoading: true, children: "Saving" } }; export const Disabled: Story = { args: { disabled: true, children: "Unavailable" } }; export const Sizes: Story = { render: (args) => (
), args: { children: undefined }, };