(
props: Omit<TreeItemContentProps, 'children'> & {children?: React.ReactNode}
)
| 23 | } |
| 24 | |
| 25 | export function TreeItemContent( |
| 26 | props: Omit<TreeItemContentProps, 'children'> & {children?: React.ReactNode} |
| 27 | ) { |
| 28 | return ( |
| 29 | <AriaTreeItemContent> |
| 30 | {({selectionBehavior, selectionMode, allowsDragging}: TreeItemContentRenderProps) => ( |
| 31 | <> |
| 32 | {allowsDragging && ( |
| 33 | <Button slot="drag"> |
| 34 | <GripVertical size={16} /> |
| 35 | </Button> |
| 36 | )} |
| 37 | {selectionBehavior === 'toggle' && selectionMode !== 'none' && ( |
| 38 | <Checkbox slot="selection" /> |
| 39 | )} |
| 40 | <Button slot="chevron"> |
| 41 | <ChevronRight /> |
| 42 | </Button> |
| 43 | {props.children} |
| 44 | </> |
| 45 | )} |
| 46 | </AriaTreeItemContent> |
| 47 | ); |
| 48 | } |
| 49 | |
| 50 | export interface TreeItemProps extends Partial<AriaTreeItemProps> { |
| 51 | title?: React.ReactNode; |
nothing calls this directly
no outgoing calls
no test coverage detected