(props: ExpandableRowChevronProps)
| 784 | }); |
| 785 | |
| 786 | function ExpandableRowChevron(props: ExpandableRowChevronProps) { |
| 787 | let expandButtonRef = useRef<HTMLButtonElement>(null); |
| 788 | let [fullProps, ref] = useContextProps( |
| 789 | {...props, slot: 'chevron'}, |
| 790 | expandButtonRef, |
| 791 | ButtonContext |
| 792 | ); |
| 793 | let {isExpanded, scale, isHidden} = fullProps; |
| 794 | let {direction} = useLocale(); |
| 795 | |
| 796 | return ( |
| 797 | <Button |
| 798 | {...props} |
| 799 | ref={ref} |
| 800 | slot="chevron" |
| 801 | className={renderProps => |
| 802 | expandButton({...renderProps, isExpanded, isRTL: direction === 'rtl', scale, isHidden}) |
| 803 | }> |
| 804 | <Chevron |
| 805 | className={style({ |
| 806 | scale: { |
| 807 | direction: { |
| 808 | ltr: '1', |
| 809 | rtl: '-1' |
| 810 | } |
| 811 | }, |
| 812 | '--iconPrimary': { |
| 813 | type: 'fill', |
| 814 | value: 'currentColor' |
| 815 | } |
| 816 | })({direction})} |
| 817 | /> |
| 818 | </Button> |
| 819 | ); |
| 820 | } |
| 821 | |
| 822 | function isNextSelected(id: Key | undefined, state: TreeState<unknown>) { |
| 823 | if (id == null || !state) { |
nothing calls this directly
no test coverage detected