{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-story",
  "title": "Button Story",
  "author": "Lloyd Richards <lloyd.d.richards@gmail.com>",
  "description": "Interactive Storybook stories demonstrating button component usage and variants",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/ui/button-story/button-radix.stories.tsx",
      "content": "import { Loader2, Mail } from \"lucide-react\";\nimport preview from \"@/.storybook/preview\";\n\nimport { Button } from \"@/components/ui/button\";\n\n/**\n * Use a button for actions such as submitting a form or opening a dialog.\n *\n * @summary Trigger an action with a text or icon button.\n */\nconst meta = preview.meta({\n  id: \"ui-radix-button\",\n  title: \"ui/Button\",\n  component: Button,\n  tags: [\"autodocs\"],\n  argTypes: {\n    variant: {\n      control: \"select\",\n      options: [\n        \"default\",\n        \"destructive\",\n        \"outline\",\n        \"secondary\",\n        \"ghost\",\n        \"link\",\n      ],\n    },\n    size: {\n      control: \"select\",\n      options: [\"default\", \"sm\", \"lg\", \"icon\"],\n      if: { arg: \"variant\", neq: \"link\" },\n    },\n    children: {\n      control: \"text\",\n    },\n    disabled: {\n      control: \"boolean\",\n    },\n    asChild: {\n      table: {\n        disable: true,\n      },\n    },\n  },\n  parameters: {\n    layout: \"centered\",\n  },\n  args: {\n    variant: \"default\",\n    size: \"default\",\n    children: \"Button\",\n    disabled: false,\n  },\n});\n\nexport default meta;\n\n/**\n * The default form of the button, used for primary actions and commands.\n */\nexport const Default = meta.story();\n\n/**\n * Prevent repeat submissions and show progress while an action is pending.\n */\nexport const Loading = meta.story({\n  render: (args) => (\n    <Button {...args}>\n      <Loader2 aria-hidden=\"true\" className=\"mr-2 h-4 w-4 animate-spin\" />\n      Saving…\n    </Button>\n  ),\n  args: {\n    variant: \"outline\",\n    \"aria-busy\": true,\n    disabled: true,\n  },\n});\n\n/**\n * When space is limited, give the icon-only button a name that describes the action.\n */\nexport const Icon = meta.story({\n  args: {\n    variant: \"secondary\",\n    size: \"icon\",\n    \"aria-label\": \"Open inbox\",\n    children: <Mail aria-hidden=\"true\" />,\n  },\n});\n\n/**\n * Use the `outline` button to reduce emphasis on secondary actions, such as\n * canceling or dismissing a dialog.\n */\nexport const Outline = meta.story({\n  args: {\n    variant: \"outline\",\n  },\n});\n\n/**\n * Use the `ghost` button is minimalistic and subtle, for less intrusive\n * actions.\n */\nexport const Ghost = meta.story({\n  args: {\n    variant: \"ghost\",\n  },\n});\n\n/**\n * Use the `secondary` button to call for less emphasized actions, styled to\n * complement the primary button while being less conspicuous.\n */\nexport const Secondary = meta.story({\n  args: {\n    variant: \"secondary\",\n  },\n});\n\n/**\n * Use the `destructive` button to indicate errors, alerts, or the need for\n * immediate attention.\n */\nexport const Destructive = meta.story({\n  args: {\n    variant: \"destructive\",\n  },\n});\n\n/**\n * Use the `link` button to reduce emphasis on tertiary actions, such as\n * hyperlink or navigation, providing a text-only interactive element.\n */\nexport const Link = meta.story({\n  args: {\n    variant: \"link\",\n  },\n});\n\n/**\n * Add an icon element to a button to enhance visual communication and\n * providing additional context for the action.\n */\nexport const WithIcon = meta.story({\n  render: (args) => (\n    <Button {...args}>\n      <Mail className=\"mr-2 h-4 w-4\" /> Login with Email Button\n    </Button>\n  ),\n  args: {\n    ...Secondary.input.args,\n  },\n});\n\n/**\n * Use the `sm` size for a smaller button, suitable for interfaces needing\n * compact elements without sacrificing usability.\n */\nexport const Small = meta.story({\n  args: {\n    size: \"sm\",\n  },\n});\n\n/**\n * Use the `lg` size for a larger button, offering better visibility and\n * easier interaction for users.\n */\nexport const Large = meta.story({\n  args: {\n    size: \"lg\",\n  },\n});\n\n/**\n * Use the `icon-sm` size for a smaller icon-only button.\n */\nexport const IconSmall = meta.story({\n  args: {\n    variant: \"secondary\",\n    size: \"icon-sm\",\n    \"aria-label\": \"Open inbox\",\n    children: <Mail aria-hidden=\"true\" />,\n  },\n});\n\n/**\n * Use the `icon-lg` size for a larger icon-only button.\n */\nexport const IconLarge = meta.story({\n  args: {\n    variant: \"secondary\",\n    size: \"icon-lg\",\n    \"aria-label\": \"Open inbox\",\n    children: <Mail aria-hidden=\"true\" />,\n  },\n});\n\n/**\n * Add the `disabled` prop to prevent interactions with the button.\n */\nexport const Disabled = meta.story({\n  args: {\n    disabled: true,\n  },\n});\n",
      "type": "registry:component",
      "target": "@ui/button.stories.tsx"
    }
  ],
  "categories": [
    "ui",
    "storybook",
    "button",
    "interaction"
  ],
  "type": "registry:file"
}