summaryrefslogtreecommitdiff
path: root/src/core/components/elements/Popup/BottomPopup.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/components/elements/Popup/BottomPopup.jsx')
-rw-r--r--src/core/components/elements/Popup/BottomPopup.jsx33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/core/components/elements/Popup/BottomPopup.jsx b/src/core/components/elements/Popup/BottomPopup.jsx
index c3c380c0..af1149ca 100644
--- a/src/core/components/elements/Popup/BottomPopup.jsx
+++ b/src/core/components/elements/Popup/BottomPopup.jsx
@@ -1,15 +1,10 @@
-import { XMarkIcon } from "@heroicons/react/24/outline"
-import { AnimatePresence, motion } from "framer-motion"
-import { useEffect } from "react"
+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
-}) => {
+const BottomPopup = ({ children, active = false, title, close }) => {
useEffect(() => {
if (active) {
document.querySelector('html, body').classList.add('overflow-hidden')
@@ -21,10 +16,10 @@ const BottomPopup = ({
return (
<>
<AnimatePresence>
- { active && (
+ {active && (
<>
<motion.div
- className="overlay"
+ className='overlay'
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
@@ -36,21 +31,21 @@ const BottomPopup = ({
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"
+ className='fixed left-0 w-full border-t border-gray_r-6 rounded-t-xl z-[60] p-4 pt-0 bg-white'
>
- <div className="flex justify-between py-4">
- <div className="font-semibold text-h-sm">{ title }</div>
- <button type="button" onClick={close}>
- <XMarkIcon className="w-5 stroke-2" />
+ <div className='flex justify-between py-4'>
+ <div className='font-semibold text-h-sm'>{title}</div>
+ <button type='button' onClick={close}>
+ <XMarkIcon className='w-5 stroke-2' />
</button>
</div>
- { children }
+ {children}
</motion.div>
</>
- ) }
+ )}
</AnimatePresence>
</>
)
}
-export default BottomPopup \ No newline at end of file
+export default BottomPopup