diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-01-04 03:07:56 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-01-04 03:07:56 +0000 |
| commit | 0d33de3744f612262c12d648cd7147a2ef238a36 (patch) | |
| tree | 285af0ed69169621228e252affdac958f016dab2 /src-migrate/modules/product-promo/components/Item.tsx | |
| parent | bb8ee26d89842b4f9b99b48f2a7cc464c6ecc4ee (diff) | |
| parent | 67398e6f10d6f7729d8f1ace7005ef13d32c5ddd (diff) | |
Merged in Feature/promotion-program (pull request #124)
Feature/promotion program
Diffstat (limited to 'src-migrate/modules/product-promo/components/Item.tsx')
| -rw-r--r-- | src-migrate/modules/product-promo/components/Item.tsx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src-migrate/modules/product-promo/components/Item.tsx b/src-migrate/modules/product-promo/components/Item.tsx new file mode 100644 index 00000000..15ca4878 --- /dev/null +++ b/src-migrate/modules/product-promo/components/Item.tsx @@ -0,0 +1,30 @@ +import style from '../styles/item.module.css' + +import React from 'react' +import Image from 'next/image' + +import { IProductVariantPromo } from '~/common/types/promotion' + +type Props = { + variant: IProductVariantPromo, + isFree?: boolean +} + +const ProductPromoItem = ({ + variant, + isFree = false +}: Props) => { + return ( + <div className={style.item}> + <div className={style.image}> + <Image src={variant.image} alt={variant.display_name} width={120} height={120} quality={100} /> + <div className={style.quantity}> + {variant.qty} pcs {isFree ? '(free)' : ''} + </div> + </div> + <div className={style.name}>{variant.name}</div> + </div> + ) +} + +export default ProductPromoItem
\ No newline at end of file |
