From 5d207f5bc60a0ed5d4adfd9eabd7f6459ccc2d84 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Fri, 8 Mar 2024 10:19:23 +0700 Subject: CR - Keranjang Mobile : informasi harga --- src-migrate/modules/cart/components/Summary.tsx | 110 +++++++++++++----------- src-migrate/pages/shop/cart/cart.module.css | 2 +- 2 files changed, 62 insertions(+), 50 deletions(-) (limited to 'src-migrate') diff --git a/src-migrate/modules/cart/components/Summary.tsx b/src-migrate/modules/cart/components/Summary.tsx index 2e55c8df..1e76d4fa 100644 --- a/src-migrate/modules/cart/components/Summary.tsx +++ b/src-migrate/modules/cart/components/Summary.tsx @@ -1,20 +1,20 @@ -import style from '../styles/summary.module.css' +import style from '../styles/summary.module.css'; -import React from 'react' -import formatCurrency from '~/libs/formatCurrency' -import clsxm from '~/libs/clsxm' -import { Skeleton } from '@chakra-ui/react' -import _ from 'lodash' +import React from 'react'; +import formatCurrency from '~/libs/formatCurrency'; +import clsxm from '~/libs/clsxm'; +import { Skeleton } from '@chakra-ui/react'; +import _ from 'lodash'; type Props = { - total?: number - discount?: number - subtotal?: number - tax?: number - shipping?: number - grandTotal?: number - isLoaded: boolean -} + total?: number; + discount?: number; + subtotal?: number; + tax?: number; + shipping?: number; + grandTotal?: number; + isLoaded: boolean; +}; const CartSummary = ({ total, @@ -27,49 +27,61 @@ const CartSummary = ({ }: Props) => { return ( <> -
Ringkasan Pesanan
- -
+
+ Ringkasan Pesanan +
-
- - Total Belanja - Rp {formatCurrency(subtotal || 0)} - +
- - Total Diskon - - Rp {formatCurrency(discount || 0)} - +
+
+ + Total Belanja + + Rp {formatCurrency(subtotal || 0)} + + -
+ + Total Diskon + + - Rp {formatCurrency(discount || 0)} + + - - Subtotal - Rp {formatCurrency(total || 0)} - +
- - Tax 11% - Rp {formatCurrency(tax || 0)} - + + Subtotal + Rp {formatCurrency(total || 0)} + - - Biaya Kirim - Rp {formatCurrency(shipping || 0)} - + + Tax 11% + Rp {formatCurrency(tax || 0)} + -
+ + Biaya Kirim + + Rp {formatCurrency(shipping || 0)} + + - - - Grand Total - - Rp {formatCurrency(grandTotal || 0)} - +
+
+ + + + Grand Total + + + Rp {formatCurrency(grandTotal || 0)} + + - ) -} + ); +}; -export default CartSummary \ No newline at end of file +export default CartSummary; diff --git a/src-migrate/pages/shop/cart/cart.module.css b/src-migrate/pages/shop/cart/cart.module.css index d523a55a..353b131a 100644 --- a/src-migrate/pages/shop/cart/cart.module.css +++ b/src-migrate/pages/shop/cart/cart.module.css @@ -19,7 +19,7 @@ } .summary-wrapper { - @apply w-full md:w-1/4 md:pl-6 mt-6 md:mt-0; + @apply w-full md:w-1/4 md:pl-6 mt-6 md:mt-0 bottom-0 md:sticky sticky bg-white; } .summary { -- cgit v1.2.3