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

Function TabListInner

packages/@react-spectrum/s2/src/Tabs.tsx:319–348  ·  view source on GitHub ↗
(props: TabListProps<T>)

Source from the content-addressed store, hash-verified

317}
318
319function TabListInner<T>(props: TabListProps<T>) {
320 let {
321 tablistRef,
322 orientation,
323 density,
324 labelBehavior,
325 'aria-label': ariaLabel,
326 'aria-labelledby': ariaLabelledBy
327 } = useContext(InternalTabsContext) ?? {};
328 let {tabs, listRef} = useContext(CollapseContext) ?? {};
329
330 return (
331 <div
332 style={props.UNSAFE_style}
333 className={(props.UNSAFE_className || '') + tablistWrapper(null, props.styles)}>
334 {listRef && (
335 <div className={tablist({orientation, labelBehavior, density})}>
336 <HiddenTabs items={tabs} density={density} listRef={listRef} />
337 </div>
338 )}
339 <RACTabList
340 {...props}
341 aria-label={ariaLabel}
342 aria-labelledby={ariaLabelledBy}
343 ref={tablistRef}
344 className={renderProps => tablist({...renderProps, labelBehavior, density})}
345 />
346 </div>
347 );
348}
349
350const selectedIndicator = style<{isDisabled: boolean; orientation?: Orientation}>({
351 position: 'absolute',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected