@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
35 lines (34 loc) • 1.84 kB
TypeScript
import { TabsProps } from "./Tabs.types";
import { useTabs } from "./useTabs";
export declare const TabsDescendantsProvider: import("react").Provider<import("../utils/hooks").DescendantsManager<HTMLButtonElement, {
value: string;
}>>, useTabsDescendantsContext: <S extends boolean = true>(strict?: S | undefined) => S extends true ? import("../utils/hooks").DescendantsManager<HTMLButtonElement, {
value: string;
}> : import("../utils/hooks").DescendantsManager<HTMLButtonElement, {
value: string;
}> | undefined, useTabsDescendants: () => import("../utils/hooks").DescendantsManager<HTMLButtonElement, {
value: string;
}>, useTabsDescendant: (options?: import("../utils/hooks/descendants/descendant").DescendantOptions<{
value: string;
}> | undefined) => {
descendants: import("../utils/hooks").DescendantsManager<HTMLButtonElement, {
value: string;
}>;
index: number;
enabledIndex: number;
register: ((instance: HTMLButtonElement | null) => void) | null;
};
type TabsProviderProps = ReturnType<typeof useTabs> & Pick<TabsProps, "selectionFollowsFocus" | "loop" | "size" | "iconPosition" | "fill">;
export declare const TabsProvider: import("react").FC<{
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, "fill" | "size" | "loop" | "iconPosition" | "selectionFollowsFocus"> & {
children: React.ReactNode;
ref?: never;
}>, useTabsContext: <S extends boolean = true>(strict?: S | undefined) => S extends true ? TabsProviderProps : TabsProviderProps | undefined;
export {};