import type { Meta, StoryObj } from '@storybook/react-vite'; import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from './breadcrumb'; const meta = { title: 'Components/Breadcrumb', component: Breadcrumb, parameters: { layout: 'centered', docs: { description: { component: 'Trail showing where the current page sits. The last crumb is the page you are on — render it as `BreadcrumbPage`, not a link, so it is announced with `aria-current="page"`.\n\n`BreadcrumbList` takes `size` (`xs` 32px, `md` 40px — CBAR builds each crumb from its Button, so these are button heights) and `colorPalette`, which only the separator uses. Note that CBAR does **not** dim the ancestors: every crumb is body ink and only the current page changes weight.', }, }, }, tags: ['autodocs'], } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => ( Home Projects Design system ), }; /** Collapse the middle when the path is deep rather than wrapping the trail. */ /** The separator stays 16px in both sizes, so the chevrons stay level. */ export const Sizes: Story = { render: () => (
{(['xs', 'md'] as const).map((size) => ( Home Projects size {size} ))}
), }; export const Collapsed: Story = { render: () => ( Home Components Button ), };