mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-11 01:10:11 +01:00
portal all modals to prevent z-index scoping issues
This commit is contained in:
parent
2961723a30
commit
25b1d69e63
@ -1,9 +1,12 @@
|
|||||||
|
import { createPortal } from "react-dom";
|
||||||
|
|
||||||
export default function ModalWrapper({ children, isOpen }) {
|
export default function ModalWrapper({ children, isOpen }) {
|
||||||
if (!isOpen) return null;
|
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">
|
<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}
|
{children}
|
||||||
</div>
|
</div>,
|
||||||
|
document.getElementById("root")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user