UNPKG

812 BTypeScriptView Raw
1import * as React from 'react';
2export declare type ContainerType = Element | DocumentFragment;
3export declare type GetContainer = string | ContainerType | (() => ContainerType) | false;
4export interface PortalProps {
5 /** Customize container element. Default will create a div in document.body when `open` */
6 getContainer?: GetContainer;
7 children?: React.ReactNode;
8 /** Show the portal children */
9 open?: boolean;
10 /** Remove `children` when `open` is `false`. Set `false` will not handle remove process */
11 autoDestroy?: boolean;
12 /** Lock screen scroll when open */
13 autoLock?: boolean;
14 /** @private debug name. Do not use in prod */
15 debug?: string;
16}
17declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<any>>;
18export default Portal;
19
\No newline at end of file