UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

34 lines (33 loc) 2.13 kB
import { TabsProps } from "./Tabs.types"; import { useTabs } from "./useTabs"; export declare const TabsDescendantsProvider: import("react").Provider<import("../util/hooks/descendants/descendant").DescendantsManager<HTMLButtonElement, { value: string; }>>, useTabsDescendantsContext: <S extends boolean = true>(strict?: S) => S extends true ? import("../util/hooks/descendants/descendant").DescendantsManager<HTMLButtonElement, { value: string; }> : import("../util/hooks/descendants/descendant").DescendantsManager<HTMLButtonElement, { value: string; }> | undefined, useTabsDescendants: () => import("../util/hooks/descendants/descendant").DescendantsManager<HTMLButtonElement, { value: string; }>, useTabsDescendant: (options?: import("../util/hooks/descendants/descendant").DescendantOptions<{ value: string; }> | undefined) => { descendants: import("../util/hooks/descendants/descendant").DescendantsManager<HTMLButtonElement, { value: string; }>; index: number; enabledIndex: number; register: (instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]; }; type TabsProviderProps = ReturnType<typeof useTabs> & Pick<TabsProps, "selectionFollowsFocus" | "loop" | "size" | "iconPosition" | "fill">; export declare const TabsProvider: import("react").ForwardRefExoticComponent<{ id: string; selectedValue: string; setSelectedValue: (next: import("react").SetStateAction<string>) => void; focusedValue: string; setFocusedValue: import("react").Dispatch<import("react").SetStateAction<string>>; makeTabId: (id: string, value: string) => string; makeTabPanelId: (id: string, value: string) => string; } & Pick<TabsProps, "size" | "fill" | "loop" | "iconPosition" | "selectionFollowsFocus"> & { children: React.ReactNode; } & import("react").RefAttributes<unknown>>, useTabsContext: <S extends boolean = true>(strict?: S) => S extends true ? TabsProviderProps : TabsProviderProps | undefined; export {};