(props: ExpandableRowChevronProps)
| 566 | }); |
| 567 | |
| 568 | function ExpandableRowChevron(props: ExpandableRowChevronProps) { |
| 569 | let expandButtonRef = useRef<HTMLButtonElement>(null); |
| 570 | let [fullProps, ref] = useContextProps( |
| 571 | {...props, slot: 'chevron'}, |
| 572 | expandButtonRef, |
| 573 | ButtonContext |
| 574 | ); |
| 575 | let {isExpanded, scale, isHidden, isCollapsed} = fullProps; |
| 576 | let {direction} = useLocale(); |
| 577 | |
| 578 | return ( |
| 579 | <Button |
| 580 | {...props} |
| 581 | ref={ref} |
| 582 | slot="chevron" |
| 583 | className={renderProps => |
| 584 | expandButton({ |
| 585 | ...renderProps, |
| 586 | isExpanded, |
| 587 | isCollapsed, |
| 588 | isRTL: direction === 'rtl', |
| 589 | scale, |
| 590 | isHidden |
| 591 | }) |
| 592 | }> |
| 593 | <Chevron |
| 594 | className={style({ |
| 595 | scale: { |
| 596 | direction: { |
| 597 | ltr: '1', |
| 598 | rtl: '-1' |
| 599 | } |
| 600 | }, |
| 601 | '--iconPrimary': { |
| 602 | type: 'fill', |
| 603 | value: 'currentColor' |
| 604 | } |
| 605 | })({direction})} |
| 606 | /> |
| 607 | </Button> |
| 608 | ); |
| 609 | } |
| 610 | |
| 611 | export interface SideNavSectionProps<T> extends Omit< |
| 612 | NavigationTreeSectionProps<T>, |
nothing calls this directly
no test coverage detected