zent
Version:
一套前端设计语言和基于React的实现
21 lines (20 loc) • 673 B
TypeScript
import { Component } from 'react';
import { IPortalContext } from './context';
export interface IPurePortalProps {
selector: string | HTMLElement;
append?: boolean;
}
export declare class PurePortal extends Component<IPurePortalProps> {
static defaultProps: {
append: boolean;
};
static contextType: import("react").Context<IPortalContext>;
context: IPortalContext;
private readonly childContext;
getContainer: (selector: string | HTMLElement) => Element | null;
contains(el: Node): boolean;
componentDidMount(): void;
componentWillUnmount(): void;
render(): import("react").ReactPortal;
}
export default PurePortal;