UNPKG

826 BTypeScriptView Raw
1import * as React from 'react';
2export interface PortalProps {
3 /**
4 * The children to render into the `container`.
5 */
6 children?: React.ReactNode;
7 /**
8 * An HTML element or function that returns one.
9 * The `container` will have the portal children appended to it.
10 *
11 * You can also provide a callback, which is called in a React layout effect.
12 * This lets you set the container from a ref, and also makes server-side rendering possible.
13 *
14 * By default, it uses the body of the top-level document object,
15 * so it's simply `document.body` most of the time.
16 */
17 container?: Element | (() => Element | null) | null;
18 /**
19 * The `children` will be under the DOM hierarchy of the parent component.
20 * @default false
21 */
22 disablePortal?: boolean;
23}
24
\No newline at end of file