@@ -27,8 +27,8 @@ export const ProductCard: React.FC<ProductCardProps> = ({
2727 return (
2828 < div className = { cn ( 'flex flex-col bg-card rounded-lg border border-border shadow-sm relative w-full h-full' ) } >
2929 { /* Image section */ }
30- < div className = "relative overflow-hidden h-[180px] flex-shrink-0 rounded-t-lg" >
31- { image ?. url && image ?. alt && (
30+ { image ?. url && image ?. alt && (
31+ < div className = "relative overflow-hidden h-[180px] shrink-0 rounded-t-lg" >
3232 < Image
3333 src = { image . url }
3434 alt = { image . alt }
@@ -37,8 +37,8 @@ export const ProductCard: React.FC<ProductCardProps> = ({
3737 className = "object-cover object-center"
3838 priority = { image . priority }
3939 />
40- ) }
41- </ div >
40+ </ div >
41+ ) }
4242 < div className = "p-6 flex flex-col gap-6 h-full" >
4343 { /* Content section */ }
4444 < div className = "flex flex-col h-full" >
@@ -48,7 +48,12 @@ export const ProductCard: React.FC<ProductCardProps> = ({
4848 </ Typography >
4949
5050 { tags && tags . length > 0 && (
51- < ul className = "flex flex-wrap gap-2 absolute top-[165px] left-6" >
51+ < ul
52+ className = { cn (
53+ 'flex flex-wrap gap-2' ,
54+ image ?. url && image ?. alt && 'absolute top-[165px] left-6' ,
55+ ) }
56+ >
5257 { tags . map ( ( tag ) => (
5358 < li key = { tag . label } >
5459 < Badge variant = { tag . variant } > { tag . label } </ Badge >
@@ -67,26 +72,32 @@ export const ProductCard: React.FC<ProductCardProps> = ({
6772 < Separator />
6873
6974 { /* Footer section */ }
70- < div className = "flex items-start sm:items-center justify-between gap-4 sm:flex-row flex-col w-full" >
71- < Typography variant = "highlightedSmall" className = "w-full" >
72- < Price price = { price } />
73- </ Typography >
75+ < div className = "flex items-start sm:items-center justify-between gap-6 sm:flex-row flex-col w-full" >
76+ < div className = "flex flex-row gap-2 w-full sm:justify-start justify-between items-center" >
77+ < Typography variant = "highlightedSmall" className = "shrink-0" >
78+ < Price price = { price } />
79+ </ Typography >
7480
75- < div className = "flex sm:items-center gap-4 sm:flex-row flex-col w-full justify-end" >
7681 { status && (
77- < Badge key = { status . label } variant = { status . variant } className = "w-fit" >
78- { status . label }
79- </ Badge >
82+ < div className = "" >
83+ < Badge key = { status . label } variant = { status . variant } className = "w-fit" >
84+ { status . label }
85+ </ Badge >
86+ </ div >
8087 ) }
88+ </ div >
8189
82- { action }
90+ { ( action || link ) && (
91+ < div className = "flex sm:items-center gap-4 sm:flex-row flex-col w-full justify-end" >
92+ { action }
8393
84- { link && (
85- < Link asChild variant = "primary" size = "default" >
86- < LinkComponent href = { link . url } > { link . label } </ LinkComponent >
87- </ Link >
88- ) }
89- </ div >
94+ { link && (
95+ < Link asChild variant = "primary" size = "default" >
96+ < LinkComponent href = { link . url } > { link . label } </ LinkComponent >
97+ </ Link >
98+ ) }
99+ </ div >
100+ ) }
90101 </ div >
91102 </ div >
92103 </ div >
0 commit comments