UNPKG

reablocks

Version:
89 lines (87 loc) 2.01 kB
import { ConnectedOverlayContentRef } from './ConnectedOverlayContent'; import { Modifiers, Placement, ReferenceProp } from '../../Position'; import { TriggerTypes } from '../OverlayTrigger'; import { FC, LegacyRef } from 'react'; export interface OverlayEvent { /** * Type of the event. */ type: TriggerTypes; /** * Native event object. */ nativeEvent: any; } export interface ConnectedOverlayProps { /** * Whether the overlay should be visible. */ open: boolean; /** * Reference of the overlay to align to. */ reference?: ReferenceProp; /** * The content of the overlay. */ children?: any; /** * Content to render in the overlay. */ content: any; /** * Type of trigger to open the overlay. */ trigger?: TriggerTypes[] | TriggerTypes; /** * Trigger element to open the overlay. */ triggerElement?: any; /** * Trigger classname. */ triggerClassName?: string; /** * Portal classname. */ portalClassName?: string; /** * Close when the body is clicked or not. */ closeOnBodyClick?: boolean; /** * Close when escape is pressed or not. */ closeOnEscape?: boolean; /** * Append the overlay to the body. Almost always want this. */ appendToBody?: boolean; /** * Overlay element type. */ elementType?: string; /** * Position modifiers. */ modifiers?: Modifiers; /** * Overlay should follow cursor or not. */ followCursor?: boolean; /** * Placement of the overlay. */ placement?: Placement; /** * Event called when the overlay is opened. */ onOpen?: (event?: any) => void; /** * Event called when the overlay is closed. */ onClose?: (event?: any) => void; } export declare const ConnectedOverlay: FC<ConnectedOverlayProps & { ref?: LegacyRef<ConnectedOverlayContentRef>; }>;