import React, { useEffect } from "react"; const CustomPopUp = ({ name, btn_class, title, children, isOpen, setIsOpen, modalHandler, }) => { const handleOpen = () => { setIsOpen(true); }; const handleClose = () => { setIsOpen(false); }; useEffect(() => { if (modalHandler) { document.body.style.overflowY = "hidden"; } return () => { document.body.style.overflowY = "unset"; }; }); return (
{isOpen && (
{title && (

{title}

)}
{children && children}
)}
); }; export default CustomPopUp; const CloseIcon = () => ( );