UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

32 lines (31 loc) 1.19 kB
/** * Web DrawerList Context * */ import React from 'react'; import type { DrawerListProviderProps } from './DrawerListProvider'; import { ContextProps } from '../../shared/Context'; import { DrawerListDataAll, DrawerListGroupTitles, DrawerListInternalData } from './'; export type DrawerListContextState = Omit<DrawerListProviderProps, 'data' | 'wrapper_element' | 'children'> & { data: DrawerListInternalData; groups?: DrawerListGroupTitles; wrapper_element?: HTMLElement; /** used by Autocomplete */ original_data?: DrawerListInternalData; /** 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; /** the id of the current active-descendant for screen readers */ ariaActiveDescendant?: string; }; export type DrawerListContextProps = ContextProps & { drawerList?: DrawerListContextState; }; declare const DrawerListContext: React.Context<DrawerListContextProps>; export default DrawerListContext;