anything-llm/frontend/src/components/ModalWrapper/index.jsx
Sean Hatfield 62da5c9933
[REFACTOR] remove all <dialog> modals and replace with custom ModalWrapper component (#641)
* add useModal hook and ModalWrapper component that will be used to replace all <dialog> modals for better browser support

* implement useModal hook and ModalWrapper component to replace all exisiting <dialog>
2024-01-23 14:19:08 -08:00

10 lines
275 B
JavaScript

export default function ModalWrapper({ children, isOpen }) {
if (!isOpen) return null;
return (
<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>
);
}