async-modal-react
Version:
A React modal that can be used with Promise.
7 lines (6 loc) • 372 B
TypeScript
import { FunctionComponent } from "react";
import { ModalOptions, ModalProps } from "../types/modal.ts";
export declare const useModal: () => {
open: <Result, Comp extends FunctionComponent<any>>(component: Comp, props?: Omit<import("react").ComponentProps<Comp>, keyof ModalProps> | undefined, options?: ModalOptions) => Promise<Result>;
closeAll: () => void;
};