UNPKG

574 BTypeScriptView Raw
1import React from 'react';
2export declare type DropDirection = 'up' | 'down' | 'left' | 'right';
3export declare type DropdownContextValue = {
4 toggle: (nextShow: boolean, event?: React.SyntheticEvent | Event) => void;
5 menuElement: HTMLElement | null;
6 toggleElement: HTMLElement | null;
7 setMenu: (ref: HTMLElement | null) => void;
8 setToggle: (ref: HTMLElement | null) => void;
9 show: boolean;
10 alignEnd?: boolean;
11 drop?: DropDirection;
12};
13declare const DropdownContext: React.Context<DropdownContextValue | null>;
14export default DropdownContext;