22 lines
570 B
TypeScript
22 lines
570 B
TypeScript
const colors: Record<string, string> = {
|
|
GK: "bg-yellow-400 text-yellow-900",
|
|
DEF: "bg-blue-500 text-white",
|
|
MID: "bg-green-500 text-white",
|
|
FWD: "bg-red-500 text-white",
|
|
};
|
|
|
|
const labels: Record<string, string> = {
|
|
GK: "دروازهبان",
|
|
DEF: "مدافع",
|
|
MID: "هافبک",
|
|
FWD: "مهاجم",
|
|
};
|
|
|
|
export default function PositionBadge({ position }: { position: string }) {
|
|
return (
|
|
<span className={`text-xs font-bold px-2 py-0.5 rounded-full ${colors[position] ?? "bg-gray-200"}`}>
|
|
{labels[position] ?? position}
|
|
</span>
|
|
);
|
|
}
|