Files
football-next/components/CountryFlag.tsx
2026-05-03 17:01:46 +03:30

27 lines
493 B
TypeScript

interface CountryFlagProps {
flagImage?: string | null;
flagEmoji?: string | null;
countryName: string;
size?: 'sm' | 'md' | 'lg' | 'xl';
}
export default function CountryFlag({
flagImage,
flagEmoji,
countryName,
size = 'md',
}: CountryFlagProps) {
const sizeClasses = {
sm: 'text-lg',
md: 'text-2xl',
lg: 'text-4xl',
xl: 'text-6xl',
};
return (
<span className={sizeClasses[size]} title={countryName}>
{flagEmoji || ''}
</span>
);
}