import { Card, CardContent, CardFooter } from '@/components/card'; import { CbarLogo } from '../brand/logo'; import { ErrorBoundary } from '~/chrome/ui/error-boundary'; import { useGroupLabel, useLang, useMessages } from '../i18n'; import { entries, groupedEntries } from '../registry'; import type { Entry } from '../registry/types'; import { Link } from '../router'; /** * What to draw on a card. * * An entry with axes renders itself at its defaults. The overlays and the data * widgets have no single default instance — a closed Dialog is an empty box — * so they fall back to their first composition, clipped to card height. */ function preview(entry: Entry) { if (entry.render) return entry.render({ ...entry.defaults }); return entry.compositions?.[0]?.render() ?? null; } /** * Every component on one page. * * Storybook can only show you one story at a time; this is the view that * answers "what is actually in this kit" in a single scroll. Each card renders * the real component at its defaults and links to its own page. */ export function OverviewPage() { const m = useMessages(); const [lang] = useLang(); const groupLabel = useGroupLabel(); return (
{m.overview.lead(entries.length)}