diff options
Diffstat (limited to 'src/core/components/elements/Popup')
| -rw-r--r-- | src/core/components/elements/Popup/BottomPopup.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/components/elements/Popup/BottomPopup.jsx b/src/core/components/elements/Popup/BottomPopup.jsx index 5828d222..1fc77932 100644 --- a/src/core/components/elements/Popup/BottomPopup.jsx +++ b/src/core/components/elements/Popup/BottomPopup.jsx @@ -3,6 +3,7 @@ import { AnimatePresence, motion } from 'framer-motion' import { useEffect } from 'react' import MobileView from '../../views/MobileView' import DesktopView from '../../views/DesktopView' +import ReactDOM from 'react-dom' const transition = { ease: 'linear', duration: 0.2 } @@ -15,7 +16,7 @@ const BottomPopup = ({ children, active = false, title, close }) => { } }, [active]) - return ( + return ReactDOM.createPortal( <> <AnimatePresence> {active && ( @@ -66,7 +67,8 @@ const BottomPopup = ({ children, active = false, title, close }) => { </> )} </AnimatePresence> - </> + </>, + document.querySelector('body') ) } |
