import type { ReactNode } from "react"; import { cn } from "@/lib/utils"; /** * 区块标题:DESIGN.md 中反复出现的「大写微标签 + 标题 + 描述」结构。 * 微标签使用 {typography.micro-uppercase}(11px / 600 / +0.5px 字距)。 */ export interface SectionHeadingProps { /** 标签上方的大写微标签 */ eyebrow?: string; title: ReactNode; description?: ReactNode; className?: string; /** 对齐方式,默认居中(营销区块);文档面可用 left */ align?: "center" | "left"; as?: "h1" | "h2" | "h3"; } export function SectionHeading({ eyebrow, title, description, className, align = "center", as: Heading = "h2", }: SectionHeadingProps) { return (
{eyebrow ? (

{eyebrow}

) : null} {title} {description ? (

{description}

) : null}
); }