summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-card
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-01-18 12:08:37 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-01-18 12:08:37 +0700
commitf02511b103acce8d3fa4bc174a43be15c4cca052 (patch)
tree08b01776038a9c44f0e21b85c3f776b22c342081 /src-migrate/modules/product-card
parentf7a0be1407da7edab60f6cb2ca3f1ef97acf811a (diff)
Update add to wishlist in product detail
Diffstat (limited to 'src-migrate/modules/product-card')
-rw-r--r--src-migrate/modules/product-card/components/ProductCard.tsx5
-rw-r--r--src-migrate/modules/product-card/styles/product-card.module.css4
2 files changed, 8 insertions, 1 deletions
diff --git a/src-migrate/modules/product-card/components/ProductCard.tsx b/src-migrate/modules/product-card/components/ProductCard.tsx
index c8a0b701..0a97b344 100644
--- a/src-migrate/modules/product-card/components/ProductCard.tsx
+++ b/src-migrate/modules/product-card/components/ProductCard.tsx
@@ -26,7 +26,7 @@ const ProductCard = ({ product, layout = 'vertical' }: Props) => {
[style['wrapper-h']]: layout === 'horizontal',
})}
>
- <div className={clsxm({
+ <div className={clsxm('relative', {
[style['image-v']]: layout === 'vertical',
[style['image-h']]: layout === 'horizontal',
})}>
@@ -38,6 +38,9 @@ const ProductCard = ({ product, layout = 'vertical' }: Props) => {
height={128}
className='object-contain object-center h-full w-full'
/>
+ {product.variant_total > 1 && (
+ <div className={style['variant-badge']}>{product.variant_total} Varian</div>
+ )}
</Link>
</div>
diff --git a/src-migrate/modules/product-card/styles/product-card.module.css b/src-migrate/modules/product-card/styles/product-card.module.css
index aac27a84..653bf2ca 100644
--- a/src-migrate/modules/product-card/styles/product-card.module.css
+++ b/src-migrate/modules/product-card/styles/product-card.module.css
@@ -48,3 +48,7 @@
.sold {
@apply text-gray-600 text-[11px];
}
+
+.variant-badge {
+ @apply bg-gray-500/20 backdrop-blur-md absolute rounded-md bottom-2 left-2 px-2 py-1 text-caption-2;
+}