From f99e0aba70efad0deb907d8e27f09fc9f527c8a4 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 17 Feb 2023 17:07:50 +0700
Subject: Refactor

---
 src/core/components/elements/Popup/BottomPopup.jsx | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 src/core/components/elements/Popup/BottomPopup.jsx

(limited to 'src/core/components/elements/Popup/BottomPopup.jsx')

diff --git a/src/core/components/elements/Popup/BottomPopup.jsx b/src/core/components/elements/Popup/BottomPopup.jsx
new file mode 100644
index 00000000..e687cf20
--- /dev/null
+++ b/src/core/components/elements/Popup/BottomPopup.jsx
@@ -0,0 +1,21 @@
+import { XMarkIcon } from "@heroicons/react/24/outline"
+
+const BottomPopup = ({ children, active, title, close }) => (
+  <>
+    <div 
+      onClick={close} 
+      className={`overlay ${active ? 'block' : 'hidden'}`} 
+    />
+    <div className={`fixed bottom-0 left-0 w-full border-t border-gray_r-6 rounded-t-xl z-[60] p-4 pt-0 bg-white ${active ? 'block' : 'hidden'}`}>
+      <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 }
+    </div>
+  </>
+)
+
+export default BottomPopup
\ No newline at end of file
-- 
cgit v1.2.3

