SectionHeading always rendered its title as <h2>, so every page whose only heading came from a shared section component (services hub, promotions, cases, faq, contact, reviews, blog list) had no <h1> at all. Add a level prop (default h2) and pass headingLevel="h1" from each page where that section is the page's own top-level heading. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013otXCiTZsxdZ4SJKZ9wUky
13 lines
513 B
React
13 lines
513 B
React
import Reveal from './Reveal.jsx';
|
|
|
|
export default function SectionHeading({ eyebrow, title, desc, level = 'h2' }) {
|
|
const Heading = level;
|
|
return (
|
|
<Reveal className="mb-10 max-w-2xl">
|
|
<p className="text-xs uppercase tracking-widest text-emerald-500 mb-3 font-mono">> {eyebrow}</p>
|
|
<Heading className="text-2xl sm:text-3xl font-bold mb-3 font-display">{title}</Heading>
|
|
{desc && <p className="text-sm sm:text-base text-slate-600 dark:text-slate-400">{desc}</p>}
|
|
</Reveal>
|
|
);
|
|
}
|