import type { Meta, StoryObj } from '@storybook/react-vite'; import { CheckIcon } from 'lucide-react'; import { Badge } from './badge'; const meta = { title: 'Components/Badge', component: Badge, parameters: { layout: 'centered', docs: { description: { component: 'Compact status or category marker. A badge is not a button — if it needs to be clickable, use `asChild` with an anchor so it is announced and focused as a link.', }, }, }, tags: ['autodocs'], argTypes: { variant: { control: 'select', options: ['default', 'secondary', 'destructive', 'success', 'warning', 'outline', 'ghost'], }, }, args: { children: 'Badge' }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Variants: Story = { render: () => (
Default Secondary Destructive Success Warning Outline Ghost
), }; export const WithIcon: Story = { render: () => ( Verified ), }; export const AsLink: Story = { render: () => ( v2.4.0 ), };