Installation
npm install --save @types/react-portal
Summary
This package contains type definitions for react-portal (https://github.com/tajo/react-portal#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-portal.
import * as React from "react";
export interface PortalProps {
children: React.ReactNode;
node?: Element | null | undefined;
}
export const Portal: React.ComponentClass<PortalProps>;
export interface PortalFunctionParams {
openPortal: (event?: any) => void;
closePortal: () => void;
portal: (children: React.ReactNode) => React.ReactElement<React.ComponentClass<PortalProps>>;
isOpen: boolean;
}
export interface PortalWithStateProps {
children: (params: PortalFunctionParams) => React.ReactNode;
node?: Element | null | undefined;
defaultOpen?: boolean | undefined;
openByClickOn?: React.ReactElement | undefined;
closeOnEsc?: boolean | undefined;
closeOnOutsideClick?: boolean | undefined;
onOpen?(): void;
onClose?(): void;
}
export const PortalWithState: React.ComponentClass<PortalWithStateProps>;
Additional Details
- Last updated: Tue, 12 Dec 2023 18:07:44 GMT
- Dependencies: @types/react
Credits
These definitions were written by Shun Takahashi, and Horus Lugo.