1 | import * as React from 'react';
|
2 | import { OverlayChildren, OverlayProps } from './Overlay';
|
3 | import { Placement } from './types';
|
4 | export type OverlayTriggerType = 'hover' | 'click' | 'focus';
|
5 | export type OverlayDelay = number | {
|
6 | show: number;
|
7 | hide: number;
|
8 | };
|
9 | export type OverlayInjectedProps = {
|
10 | onFocus?: (...args: any[]) => any;
|
11 | };
|
12 | export type OverlayTriggerRenderProps = OverlayInjectedProps & {
|
13 | ref: React.Ref<any>;
|
14 | };
|
15 | export 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 | }
|
28 | declare const OverlayTrigger: React.FC<OverlayTriggerProps>;
|
29 | export default OverlayTrigger;
|