import type { ReactNode } from "react"; type Props = { /** Small uppercase kicker above the title. */ eyebrow?: string; title: ReactNode; /** Supporting paragraph under the title. */ lead?: ReactNode; /** Optional link/button aligned to the right on wide screens. */ action?: ReactNode; align?: "left" | "center"; /** `page` for h1-sized headings, `section` for h2. */ level?: "page" | "section"; className?: string; }; /** * The heading pattern used at the top of every section: eyebrow, title, lead. * Sizes are deliberately smaller on mobile — the previous 6xl/7xl display * type overflowed narrow screens. */ export function SectionHeading({ eyebrow, title, lead, action, align = "left", level = "section", className = "", }: Props) { const Tag = level === "page" ? "h1" : "h2"; const size = level === "page" ? "text-4xl sm:text-6xl lg:text-7xl" : "text-3xl sm:text-4xl lg:text-5xl"; const centered = align === "center"; return (
{eyebrow}
)}{lead}
)}