diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-17 17:07:50 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-17 17:07:50 +0700 |
| commit | f99e0aba70efad0deb907d8e27f09fc9f527c8a4 (patch) | |
| tree | f0ac96e4e736a1d385e32553f0e641ee27e11fd3 /src/core/components/elements/Popup | |
| parent | 90e1edab9b6a8ccc09a49fed3addbec2cbc4e4c3 (diff) | |
Refactor
Diffstat (limited to 'src/core/components/elements/Popup')
| -rw-r--r-- | src/core/components/elements/Popup/BottomPopup.jsx | 21 |
1 files changed, 21 insertions, 0 deletions
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 |
