MCPcopy Create free account
hub / github.com/adobe/react-spectrum / Section

Function Section

examples/s2-next-macros/src/app/components/Section.jsx:5–29  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

3import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
4
5export default function Section(props) {
6 let {title, children} = props;
7 return (
8 <div className={style({marginY: 8})}>
9 <Heading
10 styles={style({
11 textAlign: 'center',
12 font: 'heading-lg'
13 })}
14 id={title.toLowerCase()}
15 level={2}>
16 {title}
17 </Heading>
18 <div
19 className={style({
20 display: 'flex',
21 flexDirection: 'column',
22 alignItems: 'center',
23 gap: 16
24 })}>
25 {children}
26 </div>
27 </div>
28 );
29}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected