Extracts shared section blocks for use beyond the homepage
HomeSection becomes PageSection, since every page needs the same section frame, and gains a flushTop spacing for a block right below a page head. The framed photo next to text from the homepage About block becomes MediaText, and the accent label that four components wrote out by hand becomes Eyebrow, which can also render as a heading. The homepage renders exactly as before: a layout comparison of every element against master at three widths shows no differences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
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
|
||||
@@ -35,12 +36,7 @@ export default function SectionHeading({
|
||||
mb={spacing === 'compact' ? 6 : 'sectionHeadGap'}
|
||||
textAlign={centered ? 'center' : 'start'}
|
||||
>
|
||||
{eyebrow && (
|
||||
// accent.deep instead of the design's accent: meets 4.5:1 (NFR-HP-01)
|
||||
<Text textStyle="eyebrow" color="accent.deep" mb={4}>
|
||||
{eyebrow}
|
||||
</Text>
|
||||
)}
|
||||
{eyebrow && <Eyebrow>{eyebrow}</Eyebrow>}
|
||||
<Heading
|
||||
as="h2"
|
||||
id={id}
|
||||
|
||||
Reference in New Issue
Block a user