import type { Meta, StoryObj } from "@storybook/react-vite"; import { StarRegularIcon } from "alouette-icons/phosphor-icons/Star"; import { View } from "../primitives/View"; import { Story, neutralAndAccents } from "../story-components/Story"; import { Badge } from "./Badge"; type ThisStory = StoryObj; const VARIANTS = ["solid", "solid.enabled", "outlined"] as const; const SIZES = ["sm", "md"] as const; export default { title: "alouette/Data/Badge", component: Badge, parameters: { componentSubtitle: "A small label for status, counts, or categories", }, argTypes: { accent: { description: "The accent of the badge", control: "select", options: neutralAndAccents, table: { defaultValue: { summary: "brand" } }, }, variant: { description: "The visual style of the badge", control: "select", options: VARIANTS, table: { defaultValue: { summary: "solid" } }, }, size: { description: "The size of the badge", control: "select", options: SIZES, table: { defaultValue: { summary: "md" } }, }, children: { description: "The content of the badge", control: "text" }, }, } satisfies Meta; export const BadgePreviewStory: ThisStory = { name: "Badge Preview", parameters: { layout: "padded", chromatic: { disableSnapshot: true }, }, args: { accent: "brand", children: "New" }, render: (args) => , }; export const BadgeVariantsStory: ThisStory = { name: "Badge Variants", render: () => ( {VARIANTS.map((variant) => ( {variant} ))} {VARIANTS.map((variant) => ( {neutralAndAccents.map((accent) => ( {accent} ))} ))} {SIZES.map((size) => ( {size} }> {size} with icon ))} ), };