UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

29 lines (28 loc) 1.04 kB
/** * Web DrawerList Context * */ import React from 'react'; import type { DrawerListProviderProps } from './DrawerListProvider'; import { ContextProps } from '../../shared/Context'; import { DrawerListDataAll, DrawerListDataArrayObject } from './'; export type DrawerListContextState = Omit<DrawerListProviderProps, 'data' | 'wrapper_element' | 'children'> & { data: DrawerListDataArrayObject[]; wrapper_element?: HTMLElement; /** used by Autocomplete */ original_data?: DrawerListDataArrayObject[]; /** used by Autocomplete */ current_title?: string; isOpen?: boolean; /** used internally */ _data?: any; /** used internally */ _value?: any; /** used internally to have a backup to look up what we got in the first place (array vs object) */ raw_data?: DrawerListDataAll; }; export type DrawerListContextProps = ContextProps & { drawerList?: DrawerListContextState; }; declare const DrawerListContext: React.Context<DrawerListContextProps>; export default DrawerListContext;