import { Canvas, Controls, Meta } from "@storybook/addon-docs/blocks";

import * as IconButtonStories from "./IconButton.stories";

<Meta of={IconButtonStories} />

# IconButton

Three repos, three strategies, **no names**: mux-magic hand-writes five SVG components,
castkit keeps an `ICON_PATHS` map, and plex-channels renders raw glyphs (`↶`, `↷`, `▶`,
`⚙`, `≡`) straight into a `<button>`.

A screen reader announces the last of those as "↶", and
`getByRole("button", { name: "Undo" })` finds nothing at all. That is the concrete reason
the fleet is not agent-drivable today, and the reason this component exists as something
other than `<Button sizing="icon">`.

<Canvas of={IconButtonStories.Playground} />

## Props

<Controls />

## The one rule

`label` is **required**, is a `string`, and becomes `aria-label`. There is no way to render
this component without a name, which is the point: the type system asks the question that
three hand-rolled versions forgot.

The library ships **no icons**. `children` is whatever the app already has — lucide (ISC)
is the fleet recommendation — and it is hidden from assistive technology, because the label
already names the control.

<Canvas of={IconButtonStories.AllVariants} />
