mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-05-02 17:07:13 +00:00
portal all modals to prevent z-index scoping issues
This commit is contained in:
parent
2961723a30
commit
25b1d69e63
1 changed files with 5 additions and 2 deletions
|
@ -1,9 +1,12 @@
|
|||
import { createPortal } from "react-dom";
|
||||
|
||||
export default function ModalWrapper({ children, isOpen }) {
|
||||
if (!isOpen) return null;
|
||||
|
||||
return (
|
||||
return createPortal(
|
||||
<div className="bg-black/60 backdrop-blur-sm fixed top-0 left-0 outline-none w-screen h-screen flex items-center justify-center z-30">
|
||||
{children}
|
||||
</div>
|
||||
</div>,
|
||||
document.getElementById("root")
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue