Files
Mav-Mobile-UI/src/components/UI/ModalComponent.tsx

35 lines
899 B
TypeScript
Raw Normal View History

2025-09-12 08:21:52 +01:00
import type React from "react";
import Modal from "react-modal";
import clsx from "clsx";
2025-09-12 08:21:52 +01:00
type ModalComponentProps = {
isModalOpen: boolean;
children: React.ReactNode;
2025-09-12 13:28:14 +01:00
close: () => void;
2025-09-12 08:21:52 +01:00
};
2025-10-20 10:50:16 +01:00
const ModalComponent = ({ isModalOpen, children, close }: ModalComponentProps) => {
2025-09-12 08:21:52 +01:00
return (
<Modal
isOpen={isModalOpen}
onRequestClose={close}
className={clsx(
"bg-[#1e2a38] p-3 rounded-lg shadow-lg w-[95%] mt-[2%] md:w-[60%] h-[100%] md:h-[95%] lg:h-[80%] z-[100] overflow-y-hidden border border-gray-500"
)}
2025-12-15 14:46:48 +00:00
overlayClassName="fixed inset-0 bg-[#1e2a38]/70 flex justify-center items-start z-100 "
style={{
overlay: {
transition: "opacity 200ms ease-in-out",
},
content: {
transition: "all 200ms ease-in-out",
},
}}
2025-09-12 08:21:52 +01:00
>
{children}
</Modal>
);
};
export default ModalComponent;