import type { Meta, StoryObj } from "@storybook/react" import { SvgUse } from "../../shared/SvgUse" import { IconButton } from "./IconButton" /** * A button component designed specifically for displaying icons. * Perfect for toolbar actions, navigation buttons, and compact UI elements. * * ## Props * - `variant`: "classic" | "solid" | "soft" | "surface" | "outline" | "ghost" (default: "solid") * - `size`: "1" | "2" | "3" | "4" (default: "2") * - `color`: "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky" (default: "gray") * - `radius`: "none" | "small" | "medium" | "large" | "full" * - `highContrast`: boolean * - `disabled`: boolean * - `asChild`: boolean */ const meta = { title: "base/components/IconButton", component: IconButton, tags: ["autodocs"], argTypes: { variant: { control: "select", options: ["classic", "solid", "soft", "surface", "outline", "ghost"], description: "The visual style of the icon button", }, size: { control: "select", options: ["1", "2", "3", "4"], description: "The size of the icon button", }, color: { control: "select", options: [ "gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky", ], description: "The color theme of the icon button", }, radius: { control: "select", options: ["none", "small", "medium", "large", "full"], description: "The border radius of the icon button", }, highContrast: { control: "boolean", description: "Whether to use high contrast colors", }, disabled: { control: "boolean", description: "Whether the icon button is disabled", }, }, parameters: { layout: "centered", }, args: { children: , }, } satisfies Meta export default meta type Story = StoryObj /** * Default icon button with a home icon. */ export const Default: Story = { args: {}, } /** * Icon button with different variants. */ export const Variants: Story = { render: () => (
), } /** * Icon button with different sizes. */ export const Sizes: Story = { render: () => (
), } /** * Icon button with different colors. */ export const Colors: Story = { render: () => (
), } /** * Icon button with different border radius options. */ export const Radius: Story = { render: () => (
), } /** * Icon button in disabled state. */ export const Disabled: Story = { render: () => (
), } /** * Common icon button examples for different use cases. */ export const CommonIcons: Story = { render: () => (
), } /** * Icon button with high contrast for better accessibility. */ export const HighContrast: Story = { render: () => (
), } /** * Icon button with different states and interactions. */ export const Interactive: Story = { render: () => (
alert("Home button clicked!")}> alert("Settings button clicked!")}>
), }