UNPKG

1 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverlayChildren, OverlayProps } from './Overlay';
3import { Placement } from './types';
4export type OverlayTriggerType = 'hover' | 'click' | 'focus';
5export type OverlayDelay = number | {
6 show: number;
7 hide: number;
8};
9export type OverlayInjectedProps = {
10 onFocus?: (...args: any[]) => any;
11};
12export type OverlayTriggerRenderProps = OverlayInjectedProps & {
13 ref: React.Ref<any>;
14};
15export interface OverlayTriggerProps extends Omit<OverlayProps, 'children' | 'target'> {
16 children: React.ReactElement | ((props: OverlayTriggerRenderProps) => React.ReactNode);
17 trigger?: OverlayTriggerType | OverlayTriggerType[];
18 delay?: OverlayDelay;
19 show?: boolean;
20 defaultShow?: boolean;
21 onToggle?: (nextShow: boolean) => void;
22 flip?: boolean;
23 overlay: OverlayChildren;
24 target?: never;
25 onHide?: never;
26 placement?: Placement;
27}
28declare const OverlayTrigger: React.FC<OverlayTriggerProps>;
29export default OverlayTrigger;