import type { ReactNode } from 'react'; import { Box, Heading, Text } from '@chakra-ui/react'; import Eyebrow from '@/components/Eyebrow/Eyebrow'; type SectionHeadingProps = { // Referenced by the section's aria-labelledby id: string; title: string; eyebrow?: string; // Text, or e.g. a link as in the Instagram section lead?: ReactNode; align?: 'center' | 'start'; // compact: little space below, for a heading above running text spacing?: 'default' | 'compact'; // Lets code move focus to the heading (no visible ring, theme rule) focusable?: boolean; }; // Heading block of a section (design .section__head): optional small label, // the h2 in letter-spaced capitals (the case is only CSS, the text stays as // given) and an optional intro sentence. export default function SectionHeading({ id, title, eyebrow, lead, align = 'center', spacing = 'default', focusable = false, }: SectionHeadingProps) { const centered = align === 'center'; return ( {eyebrow && {eyebrow}} {title} {lead && ( {lead} )} ); }