import { XMarkIcon } from '@heroicons/react/24/outline' import { AnimatePresence, motion } from 'framer-motion' import { useEffect } from 'react' const transition = { ease: 'linear', duration: 0.2 } const BottomPopup = ({ children, active = false, title, close }) => { useEffect(() => { if (active) { document.querySelector('html, body').classList.add('overflow-hidden') } else { document.querySelector('html, body').classList.remove('overflow-hidden') } }, [active]) return ( <> {active && ( <>
{title}
{children}
)}
) } export default BottomPopup