✨(react) add custom modal portal
In some apps this is mostly needed, for instance: when the CunninghamProvider is nested in the DOM, we want the modal to still be displayed on top of anything else, then in those cases we will be able to define a node directly in the body and tell cunningham to render modals inside it.
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { PropsWithChildren, ReactNode, useEffect } from "react";
|
||||
import classNames from "classnames";
|
||||
import ReactModal from "react-modal";
|
||||
import { Button } from ":/components/Button";
|
||||
import { NOSCROLL_CLASS } from ":/components/Modal/ModalProvider";
|
||||
import { NOSCROLL_CLASS, useModals } from ":/components/Modal/ModalProvider";
|
||||
|
||||
export type ModalHandle = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user