summaryrefslogtreecommitdiff
path: root/src-migrate/modules/cart/components
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-09-25 10:22:01 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-09-25 10:22:01 +0000
commit3aaadd0d946c303101b1fb2ef7657f48863cd548 (patch)
tree74a35ece01cf4d076882372f0cfa649cf90fa825 /src-migrate/modules/cart/components
parent736e69b540654e05a512c960adf5f2becd3c2498 (diff)
parentf09422d942fad5de2a81c19a7d66a4f403b69ed4 (diff)
Merged in cr_cart_renca (pull request #465)
Cr cart renca
Diffstat (limited to 'src-migrate/modules/cart/components')
-rw-r--r--src-migrate/modules/cart/components/CartSummaryMobile.tsx36
1 files changed, 22 insertions, 14 deletions
diff --git a/src-migrate/modules/cart/components/CartSummaryMobile.tsx b/src-migrate/modules/cart/components/CartSummaryMobile.tsx
index 02258204..7a334fed 100644
--- a/src-migrate/modules/cart/components/CartSummaryMobile.tsx
+++ b/src-migrate/modules/cart/components/CartSummaryMobile.tsx
@@ -29,7 +29,7 @@ const CartSummaryMobile = ({
isLoaded = false,
}: Props) => {
const [showPopup, setShowPopup] = useState(false);
- const PPN : number = process.env.NEXT_PUBLIC_PPN ? parseFloat(process.env.NEXT_PUBLIC_PPN) : 0;
+ const PPN: number = process.env.NEXT_PUBLIC_PPN ? parseFloat(process.env.NEXT_PUBLIC_PPN) : 0;
return (
<>
<BottomPopup
@@ -88,22 +88,30 @@ const CartSummaryMobile = ({
</div>
</BottomPopup>
<div className='flex flex-col gap-y-3'>
- <Skeleton isLoaded={isLoaded} className={style.line}>
- <span className={clsxm(style.label, style.grandTotal)}>
+ <Skeleton
+ isLoaded={isLoaded}
+ className={clsxm(style.line, 'flex items-center justify-between !py-2')}
+ >
+ {/* Left: label */}
+ <span className={clsxm(style.label, style.grandTotal, 'leading-tight')}>
Grand Total
</span>
- <button
- onClick={() => setShowPopup(true)}
- className='bg-gray-300 w-6 h-6 items-center justify-center cursor-pointer hover:bg-red-400 md:hidden '
- >
- <ChevronDownIcon className='h-6 w-6 text-white' />
- </button>
- </Skeleton>
- <Skeleton isLoaded={isLoaded} className={style.line}>
- <span className={style.value}>
- Rp {formatCurrency(grandTotal || 0)}
- </span>
+
+ {/* Right: amount + chevron */}
+ <div className="flex items-center gap-2">
+ <span className={clsxm(style.value, 'whitespace-nowrap tabular-nums leading-tight')}>
+ Rp {formatCurrency(grandTotal || 0)}
+ </span>
+ <button
+ onClick={() => setShowPopup(true)}
+ aria-label="Expand ringkasan"
+ className="md:hidden flex w-5 h-5 items-center justify-center rounded bg-gray-300 hover:bg-gray-400"
+ >
+ <ChevronDownIcon className="h-4 w-4 text-white" />
+ </button>
+ </div>
</Skeleton>
+
</div>
</>
);