Portal.d.ts 812 B

123456789101112131415161718
  1. import * as React from 'react';
  2. export declare type ContainerType = Element | DocumentFragment;
  3. export declare type GetContainer = string | ContainerType | (() => ContainerType) | false;
  4. export interface PortalProps {
  5. /** Customize container element. Default will create a div in document.body when `open` */
  6. getContainer?: GetContainer;
  7. children?: React.ReactNode;
  8. /** Show the portal children */
  9. open?: boolean;
  10. /** Remove `children` when `open` is `false`. Set `false` will not handle remove process */
  11. autoDestroy?: boolean;
  12. /** Lock screen scroll when open */
  13. autoLock?: boolean;
  14. /** @private debug name. Do not use in prod */
  15. debug?: string;
  16. }
  17. declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<any>>;
  18. export default Portal;