1 | import * as React from "react";
|
2 | import { ValidationMap } from "../../common/context";
|
3 | import { Props } from "../../common/props";
|
4 | export declare type PortalProps = IPortalProps;
|
5 |
|
6 | export interface IPortalProps extends Props {
|
7 |
|
8 | children: React.ReactNode;
|
9 | |
10 |
|
11 |
|
12 | onChildrenMount?: () => void;
|
13 | |
14 |
|
15 |
|
16 |
|
17 |
|
18 | container?: HTMLElement;
|
19 | }
|
20 | export interface IPortalState {
|
21 | hasMounted: boolean;
|
22 | }
|
23 |
|
24 | export declare type IPortalContext = PortalLegacyContext;
|
25 | export interface PortalLegacyContext {
|
26 |
|
27 | blueprintPortalClassName?: string;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | export declare class Portal extends React.Component<PortalProps, IPortalState> {
|
39 | static displayName: string;
|
40 | static contextTypes: ValidationMap<PortalLegacyContext>;
|
41 | static defaultProps: Partial<PortalProps>;
|
42 | context: PortalLegacyContext;
|
43 | state: IPortalState;
|
44 | private portalElement;
|
45 | render(): React.ReactPortal | null;
|
46 | componentDidMount(): void;
|
47 | componentDidUpdate(prevProps: PortalProps): void;
|
48 | componentWillUnmount(): void;
|
49 | private createContainerElement;
|
50 | }
|