From f15a7f8a4387d215abd1051ee520adca8944fa05 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 28 Mar 2023 16:32:45 +0700 Subject: checkout, quotation --- src/core/components/elements/Popup/BottomPopup.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/components/elements/Popup') 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( <> {active && ( @@ -66,7 +67,8 @@ const BottomPopup = ({ children, active = false, title, close }) => { )} - + , + document.querySelector('body') ) } -- cgit v1.2.3