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

Function NavigationTreeItemContent

starters/docs/src/NavigationTree.tsx:34–50  ·  view source on GitHub ↗
(props: {children?: React.ReactNode})

Source from the content-addressed store, hash-verified

32}
33
34export function NavigationTreeItemContent(props: {children?: React.ReactNode}) {
35 return (
36 <AriaNavigationTreeItemContent>
37 {({hasChildItems}: NavigationTreeItemContentRenderProps) => (
38 <>
39 {props.children}
40 <Button
41 slot="chevron"
42 isDisabled={!hasChildItems}
43 style={{visibility: hasChildItems ? undefined : 'hidden'}}>
44 <ChevronRight aria-hidden />
45 </Button>
46 </>
47 )}
48 </AriaNavigationTreeItemContent>
49 );
50}
51
52export function NavigationTreeItem(props: AriaNavigationTreeItemProps) {
53 return <AriaNavigationTreeItem {...props} />;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected