UNPKG

485 BTypeScriptView Raw
1import * as React from 'react';
2import { DropdownAction, DropdownState } from './useDropdown.types';
3export interface DropdownContextValue {
4 dispatch: React.Dispatch<DropdownAction>;
5 popupId: string;
6 registerPopup: (popupId: string) => void;
7 registerTrigger: (element: HTMLElement | null) => void;
8 state: DropdownState;
9 triggerElement: HTMLElement | null;
10}
11declare const DropdownContext: React.Context<DropdownContextValue | null>;
12export { DropdownContext };