diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-10 10:05:12 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-10 10:05:12 +0700 |
| commit | 13f6c6ad2a98efcc12b4e00b28699b584257c089 (patch) | |
| tree | 6898b0b56889302b0abacbbfc104ea183bbfcefe /src/lib/cart/components | |
| parent | 0f7846a32deec5cb400d9e73c2f2127b5de1cffd (diff) | |
| parent | 4b25b3e36c459b34f075550ca6e61b1d8f2643ce (diff) | |
Merge branch 'master' into development_tri/condition_page_detail_product
# Conflicts:
# src/lib/product/components/Product/ProductDesktop.jsx
Diffstat (limited to 'src/lib/cart/components')
| -rw-r--r-- | src/lib/cart/components/Cart.jsx | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index 448b6338..46b2b811 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -187,16 +187,13 @@ const Cart = () => { {products?.map((product) => ( <div key={product?.id} className='flex mx-4'> - <button - type='button' - className='flex items-center mr-2' + <input + type='checkbox' onClick={() => toggleSelected(product.id)} - > - {!product?.selected && ( - <div className='w-5 h-5 border border-gray_r-11 rounded' /> - )} - {product?.selected && <CheckIcon className='border bg-red_r-10 w-5 text-white' />} - </button> + checked={product?.selected} + className='mr-2 accent-danger-500 w-4' + /> + <Link href={createSlug('/shop/product/', product?.parent.name, product?.parent.id)} className='w-[30%] flex-shrink-0' @@ -230,7 +227,7 @@ const Cart = () => { {currencyFormat(product?.price?.priceDiscount)} </div> <div className='flex justify-between items-center mt-1'> - <div className='text-red_r-11 font-medium'> + <div className='text-danger-500 font-medium'> {currencyFormat(product?.price?.priceDiscount * product?.quantity)} </div> <div className='flex gap-x-1'> @@ -272,7 +269,7 @@ const Cart = () => { <div className='flex justify-between mb-4'> <div className='text-gray_r-11'> Total: - <span className='text-red_r-11 font-semibold'> + <span className='text-danger-500 font-semibold'> {selectedProduct().length > 0 ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) @@ -336,18 +333,12 @@ const Cart = () => { {products?.map((product) => ( <tr key={product.id}> <td> - <button - type='button' - className='flex items-center mr-2' + <input + type='checkbox' onClick={() => toggleSelected(product.id)} - > - {!product?.selected && ( - <div className='w-5 h-5 border border-gray_r-11 rounded' /> - )} - {product?.selected && ( - <CheckIcon className='border bg-red_r-10 w-5 text-white' /> - )} - </button> + checked={product?.selected} + className='accent-danger-500 w-4' + /> </td> <td className='flex'> <Link @@ -356,12 +347,12 @@ const Cart = () => { product?.parent.name, product?.parent.id )} - className='w-[30%] flex-shrink-0' + className='w-[20%] flex-shrink-0' > <Image src={product?.parent?.image} alt={product?.name} - className='object-contain object-center border border-gray_r-6 h-40 w-full rounded-md' + className='object-contain object-center border border-gray_r-6 h-28 w-full rounded-md' /> </Link> <div className='px-2 text-left'> @@ -408,7 +399,7 @@ const Cart = () => { </div> </td> <td> - <div className='text-red_r-11 font-medium'> + <div className='text-danger-500 font-medium'> {currencyFormat(product?.price?.priceDiscount * product?.quantity)} </div> </td> @@ -446,7 +437,7 @@ const Cart = () => { <div className='flex justify-between mb-4'> <div className='text-gray_r-11'> Total: - <span className='text-red_r-11 font-semibold'> + <span className='text-danger-500 font-semibold'> {selectedProduct().length > 0 ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) |
