import { Link } from "./index"; import { DocsPage } from "@shared/stories/DocsTemplate"; import type { Meta, StoryObj } from "@storybook/react"; const meta: Meta = { title: "Components/Link", component: Link, tags: ["autodocs"], parameters: { layout: "centered", docs: { page: DocsPage, description: { component: "A flexible link component with multiple variants and states.", }, }, }, argTypes: { variant: { control: { type: "select" }, options: ["default", "unstyled"], description: "Link styling variant", }, href: { control: { type: "text" }, description: "Link URL", }, target: { control: { type: "select" }, options: ["_self", "_blank", "_parent", "_top"], description: "Link target", }, disabled: { control: { type: "boolean" }, description: "Disable the link", }, children: { control: { type: "text" }, description: "Link content", }, }, args: { children: "Link Text", href: "#", variant: "default", target: "_self", disabled: false, }, }; export default meta; type Story = StoryObj; // Default link export const Default: Story = { args: {}, }; // Unstyled link export const Unstyled: Story = { args: { variant: "unstyled", children: "Unstyled Link", }, }; // External link export const External: Story = { args: { href: "https://example.com", target: "_blank", children: "External Link ↗", }, }; // Disabled link export const Disabled: Story = { args: { disabled: true, children: "Disabled Link", }, }; // Link with icon export const WithIcon: Story = { args: { children: "Link with Icon →", className: "flex items-center gap-2", }, }; // Navigation links export const Navigation: Story = { render: () => ( ), parameters: { docs: { description: { story: "Navigation menu with different link variants.", }, }, }, }; // All variants showcase export const AllVariants: Story = { render: () => (

Variants

Default Unstyled

Variants

Default Unstyled

States

Disabled External ↗
), parameters: { docs: { description: { story: "Showcase of all link variants, sizes, and states.", }, }, }, };