From 700c0d0537e5eb4c8acb6cc372dac160a2026a33 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Thu, 14 Dec 2023 15:44:15 +0700
Subject: feback popup information di mobile

---
 src-migrate/common/components/elements/Modal.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src-migrate/common/components/elements/Modal.tsx')

diff --git a/src-migrate/common/components/elements/Modal.tsx b/src-migrate/common/components/elements/Modal.tsx
index 9c5c73ce..b8491d2f 100644
--- a/src-migrate/common/components/elements/Modal.tsx
+++ b/src-migrate/common/components/elements/Modal.tsx
@@ -72,8 +72,8 @@ const Modal = ({
               {title}
             </div>
             {close && (
-              <button className="rounded-full h-10 w-10 flex justify-center bg-white" type='button' onClick={close}>
-                <XMarkIcon className='w-5 stroke-2' />
+              <button className="rounded-full h-10 w-10 flex justify-center items-center bg-white" type='button' onClick={close}>
+                <XMarkIcon className='w-5 h-5 ' />
               </button>
             )}
           </div>
-- 
cgit v1.2.3


From 67398e6f10d6f7729d8f1ace7005ef13d32c5ddd Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 4 Jan 2024 10:05:25 +0700
Subject: Update promotion program feature

---
 src-migrate/common/components/elements/Modal.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src-migrate/common/components/elements/Modal.tsx')

diff --git a/src-migrate/common/components/elements/Modal.tsx b/src-migrate/common/components/elements/Modal.tsx
index 8e488a3a..ea95c0b1 100644
--- a/src-migrate/common/components/elements/Modal.tsx
+++ b/src-migrate/common/components/elements/Modal.tsx
@@ -37,7 +37,7 @@ const Modal = ({
   const modalClassNames = clsxm(
     "fixed bg-white max-h-[80vh] overflow-auto p-4 pt-0 z-[60] border-gray_r-6",
     {
-      "left-1/2 -translate-x-1/2 translate-y-1/2 bottom-1/2 w-11/12 md:w-1/4 lg:w-1/3 border rounded-xl": mode === 'desktop',
+      "left-1/2 -translate-x-1/2 translate-y-1/2 bottom-1/2 w-11/12 md:w-[500px] border rounded-xl": mode === 'desktop',
       "left-0 w-full border-t bottom-0 rounded-t-xl": mode === 'mobile'
     },
     className
-- 
cgit v1.2.3


From f62b2345f463695ef0f8f79830cd76b6e0332821 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Sat, 13 Jan 2024 10:35:22 +0700
Subject: Refactor src migrate folder

---
 src-migrate/common/components/elements/Modal.tsx | 90 ------------------------
 1 file changed, 90 deletions(-)
 delete mode 100644 src-migrate/common/components/elements/Modal.tsx

(limited to 'src-migrate/common/components/elements/Modal.tsx')

diff --git a/src-migrate/common/components/elements/Modal.tsx b/src-migrate/common/components/elements/Modal.tsx
deleted file mode 100644
index c9c621e0..00000000
--- a/src-migrate/common/components/elements/Modal.tsx
+++ /dev/null
@@ -1,90 +0,0 @@
-import { XMarkIcon } from "@heroicons/react/24/outline";
-import { AnimatePresence, motion } from "framer-motion"
-import { useRouter } from "next/router";
-import { useEffect, useState } from "react";
-import ReactDOM from "react-dom";
-import { useWindowSize } from "usehooks-ts";
-import clsxm from "~/common/libs/clsxm";
-
-
-type Props = {
-  children: React.ReactNode
-  active: boolean
-  title?: string
-  close?: () => void,
-  className?: string,
-  mode?: "mobile" | "desktop"
-}
-
-const Modal = ({
-  children,
-  active = false,
-  title,
-  close,
-  className,
-  mode
-}: Props) => {
-  const router = useRouter()
-  const { width } = useWindowSize()
-  const [rendered, setRendered] = useState<boolean>(false)
-
-  mode = mode || width >= 768 ? "desktop" : "mobile"
-
-  useEffect(() => {
-    setRendered(true)
-  }, [])
-
-  const modalClassNames = clsxm(
-    "fixed bg-white max-h-[80vh] overflow-auto p-4 pt-0 z-[60] border-gray_r-6",
-    {
-      "left-1/2 -translate-x-1/2 translate-y-1/2 bottom-1/2 w-11/12 md:w-[500px] border rounded-xl": mode === 'desktop',
-      "left-0 w-full border-t bottom-0 rounded-t-xl": mode === 'mobile'
-    },
-    className
-  )
-
-  const variant = {
-    initial: { bottom: mode === 'desktop' ? '45%' : '-100%', opacity: 0 },
-    animate: { bottom: mode === 'desktop' ? '50%' : 0, opacity: 1 },
-    exit: { bottom: mode === 'desktop' ? '55%' : '-100%', opacity: 0 },
-    transition: { ease: 'linear', duration: 0.25 }
-  }
-
-  return rendered && ReactDOM.createPortal(
-    <AnimatePresence key={router.asPath}>
-      {active && (
-        <motion.div
-          className="overlay"
-          initial={{ opacity: 0 }}
-          animate={{ opacity: 1 }}
-          exit={{ opacity: 0 }}
-          onClick={close}
-        />
-      )}
-
-      {active && (
-        <motion.div
-          {...variant}
-          className={modalClassNames}
-        >
-          <div className='flex justify-between py-5 sticky top-0 '>
-            <div className='font-semibold text-h-sm md:text-title-sm'>
-              {title}
-            </div>
-            {close && (
-              <button className="rounded-full h-10 w-10 flex justify-center items-center bg-white" type='button' onClick={close}>
-                <XMarkIcon className='w-5 h-5 ' />
-              </button>
-            )}
-          </div>
-
-          {children}
-        </motion.div>
-      )}
-
-    </AnimatePresence>,
-    document.querySelector('body')!
-  )
-}
-
-export default Modal
\ No newline at end of file
-- 
cgit v1.2.3

