@material-ui/core
Version:
React components that implement Google's Material Design.
29 lines (26 loc) • 903 B
TypeScript
import * as React from 'react';
export interface PortalProps {
/**
* The children to render into the `container`.
*/
children?: React.ReactNode;
/**
* A node, component instance, or function that returns either.
* The `container` will have the portal children appended to it.
* By default, it uses the body of the top-level document object,
* so it's simply `document.body` most of the time.
*/
container?: React.ReactInstance | (() => React.ReactInstance | null) | null;
/**
* Disable the portal behavior.
* The children stay within it's parent DOM hierarchy.
*/
disablePortal?: boolean;
/**
* Callback fired once the children has been mounted into the `container`.
*
* This prop will be deprecated and removed in v5, the ref can be used instead.
*/
onRendered?: () => void;
}
export default function Portal(props: PortalProps): JSX.Element;