diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-28 16:32:45 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-28 16:32:45 +0700 |
| commit | f15a7f8a4387d215abd1051ee520adca8944fa05 (patch) | |
| tree | a51a50ba27a53ff03da38c388e36a17149ad60fa /src/core/components/elements/Popup | |
| parent | 8ca9069251873e87338f1c7f581b418bebb11e9a (diff) | |
checkout, quotation
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') ) } |
