Gannnaja commited on
Commit
86b9510
·
verified ·
1 Parent(s): 8129bc2

Upload components/NationCard.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/NationCard.jsx +20 -0
components/NationCard.jsx ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default function NationCard({ nation, onSelect }) {
2
+ return (
3
+ <div
4
+ className="bg-white rounded-lg shadow-md p-4 cursor-pointer hover:shadow-lg transition-shadow"
5
+ onClick={() => onSelect(nation)}
6
+ >
7
+ <div className="flex items-center space-x-4">
8
+ <img
9
+ src={`https://flagcdn.com/w80/${nation.flagCode}.png`}
10
+ alt={`${nation.name} flag`}
11
+ className="w-12 h-8 object-cover"
12
+ />
13
+ <div>
14
+ <h3 className="font-bold">{nation.name}</h3>
15
+ <p className="text-sm text-gray-600">Population: {nation.population}</p>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ )
20
+ }