| 90 | return React.isValidElement<SegmentedControlIconButtonProps>(childArg) ? childArg.props.icon : null |
| 91 | } |
| 92 | const getChildText = (childArg: React.ReactNode) => { |
| 93 | if (React.isValidElement<SegmentedControlButtonProps>(childArg) && childArg.type === Button) { |
| 94 | return childArg.props.children |
| 95 | } |
| 96 | |
| 97 | return React.isValidElement<SegmentedControlIconButtonProps>(childArg) ? childArg.props['aria-label'] : null |
| 98 | } |
| 99 | const listSx = merge(getSegmentedControlStyles({isFullWidth, size}), sxProp as SxProp) |
| 100 | |
| 101 | if (!ariaLabel && !ariaLabelledby) { |