19 lines
524 B
TypeScript
19 lines
524 B
TypeScript
interface UnitTypeBadgeProps {
|
|
type: string;
|
|
count: number;
|
|
}
|
|
|
|
function UnitTypeBadge({ type, count }: UnitTypeBadgeProps) {
|
|
if (count === 0) return null;
|
|
return (
|
|
<div className="flex items-center gap-[0.556vw]">
|
|
<div className="w-[1.389vw] h-[1.389vw] bg-[#A19E9E] rounded-full flex items-center justify-center">
|
|
<p className="text-caption-m text-white font-mono">{count}</p>
|
|
</div>
|
|
<p className="text-caption-m opacity-70">{type}</p>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default UnitTypeBadge;
|