UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

17 lines (16 loc) 720 B
import React from "react"; import { ComboboxOption } from "./types"; type CustomOptionsContextValue = { customOptions: ComboboxOption[]; removeCustomOption: (option: ComboboxOption) => void; addCustomOption: (option: ComboboxOption) => void; setCustomOptions: React.Dispatch<React.SetStateAction<ComboboxOption[]>>; }; declare const useComboboxCustomOptions: <S extends boolean = true>(strict?: S) => S extends true ? CustomOptionsContextValue : CustomOptionsContextValue | undefined; declare const CustomOptionsProvider: ({ children, value, }: { children: any; value: { isMultiSelect?: boolean; }; }) => React.JSX.Element; export { CustomOptionsProvider, useComboboxCustomOptions };