import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters" import type { Meta, StoryObj } from "@storybook/react" import { categoricalArgType, intentArgType, } from "../argTypes.storyHelpers.ts" import { Badge } from "../Badge/Badge.tsx" import { StoryCell, StoryGrid, StoryRow, StorySection, } from "../board.storyHelpers.tsx" import { DotIcon } from "../icons.storyHelpers.tsx" import { BadgeButton } from "./BadgeButton.tsx" const INTENTS = [ "neutral", "accent", "success", "warning", "danger", "info", ] as const const meta = { title: "Components/Actions/BadgeButton", component: BadgeButton, parameters: { layout: "padded" }, argTypes: { categorical: categoricalArgType, intent: intentArgType, }, // The component's own defaults, restated — Storybook does not // seed `args` from docgen, so an unstated default shows in the // props table with nothing selected in its control. args: { appearance: "soft", intent: "neutral", isDisabled: false, onClick: () => {}, overflow: "truncate", size: "md", }, } satisfies Meta export default meta type Story = StoryObj /** * A pill with a `button` role, so `getByRole("button", { name })` * finds it — which is what an agent, and every test in the fleet, * actually matches on. */ export const Playground: Story = { parameters: playgroundParameters, args: { children: "1 episode", intent: "accent" }, } /** * The claim this component exists to make, side by side: a * `BadgeButton` and a `Badge` with identical visual props are the * same pill, and one of them is a real `