import type { ReactNode } from "react"; import { BackLink } from "@/components/ui/back-link"; import { cn } from "@/lib/utils"; /** * The one canonical page header. Every module surface renders its title * through this so the header vocabulary reads identically app-wide: the H1 * is always `text-2xl font-bold tracking-tight`, the explainer under it is * always `text-muted-foreground text-sm` (heading in foreground, one-line * explainer in muted — the app-wide convention the design standards pin for * `CardDescription`, `PageHeader`, and `SettingsCardHeader` alike), and no * icon sits beside the H1. An optional back-link rides above the title, and * an `actions` slot holds the page's primary buttons to the right of the * title block. * * The explainer never truncates. A page that clipped it mid-word to hold one * line on a phone was trading a readable sentence for a fixed height; the * fixed height now comes from every header being built the same way, and a * sentence too long for one line is a text problem, fixed in the string. * * `headingAs="div"` renders the title as `role="heading" aria-level={1}` * instead of an `
{description}
) : null}