UNPKG

1.06 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverlayProps as BaseOverlayProps, OverlayArrowProps } from '@restart/ui/Overlay';
3import { TransitionType } from './helpers';
4import { Placement, PopperRef, RootCloseEvent } from './types';
5export interface OverlayInjectedProps {
6 ref: React.RefCallback<HTMLElement>;
7 style: React.CSSProperties;
8 'aria-labelledby'?: string;
9 arrowProps: Partial<OverlayArrowProps>;
10 show: boolean;
11 placement: Placement | undefined;
12 popper: PopperRef;
13 hasDoneInitialMeasure?: boolean;
14 [prop: string]: any;
15}
16export type OverlayChildren = React.ReactElement<OverlayInjectedProps> | ((injected: OverlayInjectedProps) => React.ReactNode);
17export interface OverlayProps extends Omit<BaseOverlayProps, 'children' | 'transition' | 'rootCloseEvent'> {
18 children: OverlayChildren;
19 transition?: TransitionType;
20 placement?: Placement;
21 rootCloseEvent?: RootCloseEvent;
22}
23declare const Overlay: React.ForwardRefExoticComponent<OverlayProps & React.RefAttributes<HTMLElement>>;
24export default Overlay;
25
\No newline at end of file