diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-11 10:58:20 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-11 10:58:20 +0700 |
| commit | f0a720441def88187b3913268238c379362fb9d3 (patch) | |
| tree | c483040273b6a4d8db1912d0c48d5b88fb25e763 /src | |
| parent | 92c2a229d9c9b510d71b928978872a8b107e9d5a (diff) | |
add popup property
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/components/elements/Popup/BottomPopup.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/components/elements/Popup/BottomPopup.jsx b/src/core/components/elements/Popup/BottomPopup.jsx index 1d65c7a3..80afa8d9 100644 --- a/src/core/components/elements/Popup/BottomPopup.jsx +++ b/src/core/components/elements/Popup/BottomPopup.jsx @@ -7,7 +7,7 @@ import ReactDOM from 'react-dom' const transition = { ease: 'linear', duration: 0.2 } -const BottomPopup = ({ children, active = false, title, close }) => { +const BottomPopup = ({ children, active = false, title, close, className = '' }) => { useEffect(() => { if (active) { document.querySelector('html, body').classList.add('overflow-hidden') @@ -35,7 +35,7 @@ const BottomPopup = ({ children, active = false, title, close }) => { animate={{ bottom: 0 }} exit={{ bottom: '-100%' }} transition={transition} - className='fixed left-0 w-full border-t border-gray_r-6 rounded-t-xl z-[60] p-4 pt-0 bg-white max-h-[80vh] overflow-auto' + className={`fixed left-0 w-full border-t border-gray_r-6 rounded-t-xl z-[60] p-4 pt-0 bg-white max-h-[80vh] overflow-auto ${className}`} > <div className='flex justify-between py-4'> <div className='font-semibold text-h-sm'>{title}</div> @@ -53,7 +53,7 @@ const BottomPopup = ({ children, active = false, title, close }) => { animate={{ bottom: '50%', opacity: 1 }} exit={{ bottom: '45%', opacity: 0 }} transition={transition} - className='fixed left-1/2 -translate-x-1/2 translate-y-1/2 md:w-1/4 lg:w-1/3 border border-gray_r-6 rounded-xl z-[60] p-4 pt-0 bg-white max-h-[80vh] overflow-auto' + className={`fixed left-1/2 -translate-x-1/2 translate-y-1/2 md:w-1/4 lg:w-1/3 border border-gray_r-6 rounded-xl z-[60] p-4 pt-0 bg-white max-h-[80vh] overflow-auto ${className}`} > <div className='flex justify-between py-4'> <div className='font-semibold text-h-sm'>{title}</div> |
