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