mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
25 lines
735 B
TypeScript
25 lines
735 B
TypeScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { DOMContainer } from './useWaitForDOMRef';
|
|
export interface PortalProps {
|
|
children: React.ReactElement;
|
|
container: DOMContainer;
|
|
onRendered?: (element: any) => void;
|
|
}
|
|
/**
|
|
* @public
|
|
*/
|
|
declare const Portal: {
|
|
({ container, children, onRendered }: PortalProps): JSX.Element | null;
|
|
displayName: string;
|
|
propTypes: {
|
|
/**
|
|
* A DOM element, Ref to an element, or function that returns either. The `container` will have the Portal children
|
|
* appended to it.
|
|
*/
|
|
container: PropTypes.Requireable<any>;
|
|
onRendered: PropTypes.Requireable<(...args: any[]) => any>;
|
|
};
|
|
};
|
|
export default Portal;
|