@@ -29,60 +29,70 @@ export function MatchCard({ match, onEdit, onDelete }: MatchCardProps) {
29
29
} ;
30
30
31
31
return (
32
- < div className = "bg-white rounded-lg shadow-md p-4" >
33
- < div className = "flex items-center justify-between mb-4" >
34
- < div className = "flex items-center gap-2 text-gray-600" >
35
- < Calendar className = "w-4 h-4" />
36
- < span > { format ( new Date ( match . date ) , 'PPP' , { locale : es } ) } </ span >
32
+ < div className = "bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow" >
33
+ { /* Header */ }
34
+ < div className = "flex items-center justify-between mb-5" >
35
+ < div className = "flex items-center gap-3 text-gray-500" >
36
+ < Calendar className = "w-5 h-5" />
37
+ < span className = "text-sm font-medium" > { format ( new Date ( match . date ) , 'PPP' , { locale : es } ) } </ span >
37
38
</ div >
38
- < div className = "flex items-center gap-2 " >
39
+ < div className = "flex items-center gap-3 " >
39
40
< button
40
41
onClick = { ( ) => setIsEditing ( true ) }
41
- className = "p-2 text-emerald-600 hover:bg -emerald-50 rounded-full transition-colors"
42
+ className = 'rounded-full text-emerald-600 hover:text -emerald-200 transition-colors'
42
43
title = "Editar partido"
44
+ aria-label = "Editar partido"
43
45
>
44
46
< Edit className = "w-5 h-5" />
45
47
</ button >
46
48
< button
47
49
onClick = { handleDelete }
48
- className = "text-red-500 hover:text-red-700 transition-colors"
50
+ className = 'rounded-full text-red-600 hover:text-red-200 transition-colors'
51
+ title = "Eliminar partido"
52
+ aria-label = "Eliminar partido"
49
53
>
50
54
< Trash2 className = "w-5 h-5" />
51
55
</ button >
52
56
</ div >
53
57
</ div >
54
-
55
- < div className = "grid grid-cols-3 gap-4 align-top" >
58
+
59
+ { /* Match Details */ }
60
+ < div className = "grid grid-cols-3 gap-6 align-top" >
61
+ { /* Team A */ }
56
62
< div className = "text-center" >
57
- < div className = "font-semibold mb-2" > Equipo A</ div >
58
- < div className = "text-2xl font-bold text-emerald-600" > { match . teamA . score } </ div >
59
- < div className = "mt-2 text-sm text-gray-600 " >
63
+ < div className = "text-gray-700 font-semibold mb-2" > Equipo A</ div >
64
+ < div className = "text-3xl font-bold text-emerald-600" > { match . teamA . score } </ div >
65
+ < div className = "mt-2 text-sm text-gray-500 " >
60
66
{ match . teamA . players . map ( p => p . name ) . join ( ', ' ) }
61
67
</ div >
62
68
</ div >
63
-
64
- < div className = "text-center text-gray-400" > vs</ div >
65
-
69
+
70
+ < div className = "text-center text-gray-400 text-xl font-bold" > vs</ div >
71
+
72
+ { /* Team B */ }
66
73
< div className = "text-center" >
67
- < div className = "font-semibold mb-2" > Equipo B</ div >
68
- < div className = "text-2xl font-bold text-emerald-600" > { match . teamB . score } </ div >
69
- < div className = "mt-2 text-sm text-gray-600 " >
74
+ < div className = "text-gray-700 font-semibold mb-2" > Equipo B</ div >
75
+ < div className = "text-3xl font-bold text-emerald-600" > { match . teamB . score } </ div >
76
+ < div className = "mt-2 text-sm text-gray-500 " >
70
77
{ match . teamB . players . map ( p => p . name ) . join ( ', ' ) }
71
78
</ div >
72
79
</ div >
73
80
</ div >
74
-
81
+
82
+ { /* Goals */ }
75
83
{ match . goals . length > 0 && (
76
- < div className = "mt-4 pt-4 border-t" >
77
- < div className = "flex items-center gap-2 mb-2 " >
78
- < Trophy className = "w-4 h-4 text-yellow-500" />
79
- < span className = "font-semibold" > Goles</ span >
84
+ < div className = "mt-6 pt-4 border-t border-gray-200 " >
85
+ < div className = "flex items-center gap-3 mb-3 " >
86
+ < Trophy className = "w-5 h-5 text-yellow-500" />
87
+ < span className = "text-lg font-semibold text-gray-700 " > Goles</ span >
80
88
</ div >
81
- < div className = "text-sm text-gray-600" >
89
+ < div className = "text-sm text-gray-600 space-y-2 " >
82
90
{ match . goals . map ( ( goal , index ) => (
83
- < div key = { index } className = "mb-1" >
91
+ < div key = { index } >
84
92
{ `${ match . teamA . players . concat ( match . teamB . players ) . find ( p => p . id === goal . playerId ) ?. name } (${ goal . minute } ')` }
85
- { goal . assistById && ` - Asistencia: ${ match . teamA . players . concat ( match . teamB . players ) . find ( p => p . id === goal . assistById ) ?. name } ` }
93
+ { goal . assistById && (
94
+ < span className = "text-gray-500" > - Asistencia: { match . teamA . players . concat ( match . teamB . players ) . find ( p => p . id === goal . assistById ) ?. name } </ span >
95
+ ) }
86
96
</ div >
87
97
) ) }
88
98
</ div >
0 commit comments