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

Function SideNav

packages/dev/s2-docs/src/Nav.tsx:229–253  ·  view source on GitHub ↗
({children, isNested = false})

Source from the content-addressed store, hash-verified

227
228// Used by the ToC
229export function SideNav({children, isNested = false}) {
230 return (
231 <ul
232 className={style({
233 listStyleType: 'none',
234 padding: 0,
235 paddingStart: {
236 default: 0,
237 ':is(li > ul)': 16
238 },
239 paddingTop: {
240 default: 0,
241 isNested: 8
242 },
243 margin: 0,
244 display: 'flex',
245 flexDirection: 'column',
246 gap: 8,
247 width: 'full',
248 boxSizing: 'border-box'
249 })({isNested})}>
250 {children}
251 </ul>
252 );
253}
254
255export function SideNavItem(props) {
256 return <li>{props.children}</li>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected