import type { ReactNode } from 'react'; import Eyebrow from '@/components/site/eyebrow'; import { cn } from '@/lib/utils'; type SectionHeaderProps = { eyebrow?: ReactNode; eyebrowIcon?: string; title: ReactNode; description?: ReactNode; /** * `left`: stacked, `center`: centered, `split`: title on the left and the * description (or `aside`) aligned to the bottom right. */ align?: 'left' | 'center' | 'split'; aside?: ReactNode; className?: string; }; export default function SectionHeader({ eyebrow, eyebrowIcon, title, description, align = 'left', aside, className, }: SectionHeaderProps) { const heading = (
{eyebrow && {eyebrow}}

{title}

{description && align !== 'split' && (

{description}

)}
); if (align === 'split') { return (
{heading} {aside ?? (description && (

{description}

))}
); } return (
{heading}
); }