UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

15 lines (14 loc) 819 B
/** * https://github.com/chakra-ui/chakra-ui/tree/5ec0be610b5a69afba01a9c22365155c1b519136/packages/components/descendant */ import React from "react"; import { DescendantOptions, DescendantsManager } from "./descendant"; /** * Provides strongly typed versions of the context provider and hooks above. */ export declare function createDescendantContext<T extends HTMLElement = HTMLElement, K extends Record<string, any> = object>(): readonly [React.Provider<DescendantsManager<T, K>>, <S extends boolean = true>(strict?: S) => S extends true ? DescendantsManager<T, K> : DescendantsManager<T, K> | undefined, () => DescendantsManager<T, K>, (options?: DescendantOptions<K>) => { descendants: DescendantsManager<T, K>; index: number; enabledIndex: number; register: (instance: T | null) => void; }];