(props: TreeViewItemContentProps)
| 606 | } |
| 607 | |
| 608 | export const TreeViewItemContent = (props: TreeViewItemContentProps): ReactNode => { |
| 609 | let {children} = props; |
| 610 | let scale = useScale(); |
| 611 | |
| 612 | let {selectionStyle} = useContext(InternalTreeViewContext); |
| 613 | |
| 614 | return ( |
| 615 | <TreeItemContent> |
| 616 | {({ |
| 617 | isExpanded, |
| 618 | hasChildItems, |
| 619 | selectionMode, |
| 620 | selectionBehavior, |
| 621 | isDisabled, |
| 622 | isSelected, |
| 623 | id, |
| 624 | state, |
| 625 | isHovered, |
| 626 | isFocusVisible, |
| 627 | isFocusVisibleWithin, |
| 628 | allowsDragging, |
| 629 | isDropTarget |
| 630 | }) => { |
| 631 | return ( |
| 632 | <div |
| 633 | className={treeCellGrid({ |
| 634 | isDisabled, |
| 635 | isNextSelected: isNextSelected(id, state), |
| 636 | isSelected, |
| 637 | selectionStyle |
| 638 | })}> |
| 639 | <div |
| 640 | className={treeRowBackground({ |
| 641 | isHovered, |
| 642 | isFocusVisible, |
| 643 | isSelected, |
| 644 | selectionStyle, |
| 645 | isNextSelected: isNextSelected(id, state), |
| 646 | isPreviousSelected: isPrevSelected(id, state), |
| 647 | isDropTarget |
| 648 | })} |
| 649 | /> |
| 650 | {isFocusVisible && ( |
| 651 | <div |
| 652 | className={treeRowFocusRing({ |
| 653 | isFocusVisible, |
| 654 | selectionStyle, |
| 655 | isSelected, |
| 656 | isNextSelected: isNextSelected(id, state), |
| 657 | isFirstItem: isFirstItem(id, state) |
| 658 | })} |
| 659 | /> |
| 660 | )} |
| 661 | {allowsDragging && ( |
| 662 | <div className={treeDragButtonContainer}> |
| 663 | {!isDisabled && <DragHandleButton isFocusVisibleWithin={isFocusVisibleWithin} />} |
| 664 | </div> |
| 665 | )} |
nothing calls this directly
no test coverage detected