(props: TabPanelProps)
| 485 | |
| 486 | // @private |
| 487 | function TabPanel(props: TabPanelProps) { |
| 488 | const {tabState, tabPanelProps: ctxTabPanelProps} = useContext(TabContext)!; |
| 489 | const {tabListState} = tabState; |
| 490 | let ref = useRef<HTMLDivElement | null>(null); |
| 491 | const {tabPanelProps} = useTabPanel(props, tabListState, ref); |
| 492 | let {styleProps} = useStyleProps(props); |
| 493 | |
| 494 | if (ctxTabPanelProps['aria-labelledby']) { |
| 495 | // oxlint-disable-next-line react/react-compiler |
| 496 | tabPanelProps['aria-labelledby'] = ctxTabPanelProps['aria-labelledby']; |
| 497 | } |
| 498 | |
| 499 | return ( |
| 500 | <FocusRing focusRingClass={classNames(styles, 'focus-ring')}> |
| 501 | <div |
| 502 | {...styleProps} |
| 503 | {...tabPanelProps} |
| 504 | ref={ref} |
| 505 | className={classNames(styles, 'spectrum-TabsPanel-tabpanel', styleProps.className)}> |
| 506 | {props.children} |
| 507 | </div> |
| 508 | </FocusRing> |
| 509 | ); |
| 510 | } |
| 511 | |
| 512 | interface TabPickerProps<T> extends Omit<SpectrumPickerProps<T>, 'children' | 'onSelectionChange'> { |
| 513 | density?: 'compact' | 'regular'; |
nothing calls this directly
no test coverage detected