| 266 | ]; |
| 267 | |
| 268 | let DynamicTreeItem = props => { |
| 269 | return ( |
| 270 | <TreeItem {...props}> |
| 271 | <TreeItemContent> |
| 272 | {({isExpanded, hasChildItems, selectionMode, selectionBehavior, allowsDragging}) => ( |
| 273 | <> |
| 274 | {(selectionMode !== 'none' || props.href != null) && selectionBehavior === 'toggle' && ( |
| 275 | <Checkbox slot="selection" /> |
| 276 | )} |
| 277 | {allowsDragging && <Button slot="drag">≡</Button>} |
| 278 | {hasChildItems && <Button slot="chevron">{isExpanded ? '⏷' : '⏵'}</Button>} |
| 279 | {props.supportsDragging && <Button slot="drag">≡</Button>} |
| 280 | <Text>{props.title || props.children}</Text> |
| 281 | <Button aria-label="Info">ⓘ</Button> |
| 282 | <Button aria-label="Menu">☰</Button> |
| 283 | </> |
| 284 | )} |
| 285 | </TreeItemContent> |
| 286 | <Collection items={props.childItems}> |
| 287 | {(item: any) => ( |
| 288 | <DynamicTreeItem |
| 289 | supportsDragging={props.supportsDragging} |
| 290 | childItems={item.childItems} |
| 291 | textValue={item.name} |
| 292 | href={props.href}> |
| 293 | {item.name} |
| 294 | </DynamicTreeItem> |
| 295 | )} |
| 296 | </Collection> |
| 297 | </TreeItem> |
| 298 | ); |
| 299 | }; |
| 300 | |
| 301 | let DynamicTree = ({treeProps = {}, rowProps = {}}) => ( |
| 302 | <Tree |
nothing calls this directly
no outgoing calls
no test coverage detected