diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-13 17:09:53 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-13 17:09:53 +0700 |
| commit | a88dbd7f7b271e78290506fdc61d68adba5d0019 (patch) | |
| tree | 43f89a761f7b72cc936e45004a4fbda2f445f92c /src/components/variants/VariantCard.js | |
| parent | ada443445767679dd2d2b2c889bfac02609778b8 (diff) | |
Fixing
Diffstat (limited to 'src/components/variants/VariantCard.js')
| -rw-r--r-- | src/components/variants/VariantCard.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/variants/VariantCard.js b/src/components/variants/VariantCard.js index 2d27371b..a821480c 100644 --- a/src/components/variants/VariantCard.js +++ b/src/components/variants/VariantCard.js @@ -41,6 +41,15 @@ export default function VariantCard({ {product.code || '-'} {product.attributes.length > 0 ? ` ・ ${product.attributes.join(', ')}` : ''} </p> + <div className="flex flex-wrap gap-x-1 items-center mt-auto"> + {product.price.discount_percentage > 0 && ( + <> + <p className="text-caption-2 text-gray_r-11 line-through">{currencyFormat(product.price.price)}</p> + <span className="badge-red">{product.price.discount_percentage}%</span> + </> + )} + <p className="text-caption-2 text-gray_r-12">{currencyFormat(product.price.price_discount)}</p> + </div> <p className="text-caption-2 text-gray_r-11 mt-1"> {currencyFormat(product.price.price_discount)} × {product.quantity} Barang </p> |
