UNPKG

@redocly/theme

Version:

Shared UI components lib

19 lines (18 loc) 703 B
type UseTabsProps = { initialTab: string; totalTabs: number; containerRef?: React.RefObject<HTMLElement | null>; }; export declare function useTabs({ initialTab, totalTabs, containerRef }: UseTabsProps): { activeTab: string; setActiveTab: import("react").Dispatch<import("react").SetStateAction<string>>; setTabRef: (element: HTMLButtonElement | null, index: number) => void; onTabClick: (labelOrIndex: string | number) => void; handleKeyboard: (event: React.KeyboardEvent, index: number) => void; getTabId: (label: string, index: number) => string; visibleTabs: number[]; overflowTabs: number[]; ready: boolean; allTabsHidden: boolean; }; export {};