import type { ReactNode } from 'react'; import { PACKAGE } from '~/chrome/lib/package-name'; import { CopyBlock } from '~/chrome/ui/copy'; import { useMessages } from '../i18n'; import { entries } from '../registry'; import { Link } from '../router'; /** * What the kit is, and how to consume it. * * Ported from `docs/Introduction.mdx`, which was a Storybook docs-only page. * Storybook is optional now, so this had to move somewhere that always exists — * and moving it made it better than a copy: the install snippet is built from * the real package name, and the component count is the registry's rather than * a number in prose that goes stale. */ function Section({ title, children }: { title: string; children: ReactNode }) { return (

{title}

{children}
); } export function IntroductionPage() { const m = useMessages(); return (

{m.header.foundations}

{m.introduction.title}

{m.introduction.lead}

{m.introduction.install.body}

{/* The stylesheet import is once, at the app root; the component import is per component. Two blocks rather than one, because they belong in two different files and pasting them together is the mistake. */}
{m.introduction.structure.folders.term}
{m.introduction.structure.folders.def}
{m.introduction.structure.tokens.term}
{m.introduction.structure.tokens.def}
{m.introduction.structure.styles.term}
{m.introduction.structure.styles.def}
{m.introduction.structure.deps.term}
{m.introduction.structure.deps.def}

{m.introduction.adding.body}

{m.introduction.adding.byHand}

); }