lucid-ui
Version:
A UI component library from Xandr.
42 lines • 1.36 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
import { StandardProps } from '../../util/component-types';
export interface IPortalProps extends StandardProps, React.HTMLProps<HTMLDivElement> {
/** The `id` of the portal element that is appended to `document.body`. */
portalId?: string;
}
interface IPortalState {
isReady: boolean;
}
declare class Portal extends React.Component<IPortalProps, IPortalState, {}> {
static displayName: string;
static peek: {
description: string;
categories: string[];
};
static propTypes: {
/**
any valid React children
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
Appended to the component-specific class names set on the root element.
Value is run through the \`classnames\` library.
*/
className: PropTypes.Requireable<any>;
/**
The \`id\` of the portal element that is appended to \`document.body\`.
*/
portalId: PropTypes.Requireable<string>;
};
state: {
isReady: boolean;
};
manuallyCreatedPortal: boolean;
portalElement: HTMLElement;
componentDidMount(): void;
componentWillUnmount(): void;
render(): React.ReactNode;
}
export default Portal;
//# sourceMappingURL=Portal.d.ts.map