fixed some sizes
This commit is contained in:
@@ -272,7 +272,7 @@ export default function ProductCard({
|
||||
// style={{ height, maxWidth: width }}
|
||||
>
|
||||
{/* Image Section */}
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-gray-50 to-gray-100 overflow-hidden">
|
||||
<div className="relative w-full aspect-square bg-gradient-to-br from-gray-50 to-gray-100 overflow-hidden">
|
||||
<Carousel
|
||||
opts={{ align: "start", loop: true, watchDrag: true }}
|
||||
setApi={setApi}
|
||||
@@ -281,14 +281,14 @@ export default function ProductCard({
|
||||
onPointerUp={() => setIsInteracting(false)}
|
||||
onPointerCancel={() => setIsInteracting(false)}
|
||||
>
|
||||
<CarouselContent className="h-auto ml-0">
|
||||
<CarouselContent className="h-full ml-0">
|
||||
{images.map((image, idx) => (
|
||||
<CarouselItem key={idx} className="h-auto pl-0">
|
||||
<div className="h-full flex items-center justify-center p-2">
|
||||
<CarouselItem key={idx} className="h-full pl-0">
|
||||
<div className="w-full h-full flex items-center justify-center p-1 md:p-2">
|
||||
<img
|
||||
src={image}
|
||||
alt={`${name} - ${idx + 1}`}
|
||||
className={`max-w-full max-h-full object-cover transition-transform duration-500 ${
|
||||
className={`max-w-full max-h-full object-contain rounded-t-sm transition-transform duration-500 ${
|
||||
isHovered ? "scale-105" : "scale-100"
|
||||
}`}
|
||||
draggable="false"
|
||||
@@ -372,17 +372,17 @@ export default function ProductCard({
|
||||
{/* Content Section */}
|
||||
<CardContent className="p-3 space-y-3">
|
||||
{/* Product Name */}
|
||||
<h3 className="text-gray-900 text-base font-semibold leading-tight line-clamp-2">
|
||||
<h3 className="text-gray-900 text-base font-semibold leading-tight line-clamp-2 min-h-[40px]">
|
||||
{name}
|
||||
</h3>
|
||||
|
||||
{/* Price */}
|
||||
<div className="flex items-baseline gap-1">
|
||||
<div className="flex-col flex md:flex-row items-baseline gap-1">
|
||||
<p
|
||||
className="text-xl font-bold tracking-tight"
|
||||
style={{ color: price_color }}
|
||||
>
|
||||
{struct_price_text}
|
||||
{struct_price_text.replace(/\.00\b/, "")}
|
||||
</p>
|
||||
{oldPrice && (
|
||||
<span className="text-sm text-gray-400 line-through ">
|
||||
@@ -426,9 +426,9 @@ export default function ProductCard({
|
||||
) : (
|
||||
<>
|
||||
<ShoppingCart className="h-5 w-5" />
|
||||
<span className="hidden md:flex">
|
||||
{/* <span className="hidden md:flex">
|
||||
{t("add_to_cart")}
|
||||
</span>
|
||||
</span> */}
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user