MCPcopy Create free account
hub / github.com/adobe/react-spectrum / CollapsedTabPanel

Function CollapsedTabPanel

packages/@react-spectrum/s2/src/Tabs.tsx:594–611  ·  view source on GitHub ↗
(props: TabPanelProps)

Source from the content-addressed store, hash-verified

592}
593
594function CollapsedTabPanel(props: TabPanelProps) {
595 // eslint-disable-next-line @typescript-eslint/no-unused-vars
596 let {UNSAFE_style, UNSAFE_className = '', id, shouldForceMount, ...otherProps} = props;
597 let {menuId, valueId} = useContext(CollapseContext);
598 let ref = useRef(null);
599 let tabIndex = useHasTabbableChild(ref) ? undefined : 0;
600
601 return (
602 <Group
603 {...otherProps}
604 ref={ref}
605 aria-labelledby={menuId + ' ' + valueId}
606 tabIndex={tabIndex}
607 style={UNSAFE_style}
608 className={renderProps => UNSAFE_className + tabPanel(renderProps, props.styles)}
609 />
610 );
611}
612
613function isEveryTabDisabled<T>(
614 collection: Collection<Node<T>> | undefined,

Callers

nothing calls this directly

Calls 1

useHasTabbableChildFunction · 0.90

Tested by

no test coverage detected