mirror of
https://github.com/lexogrine/cs2-react-hud.git
synced 2026-05-03 19:53:11 +02:00
14 lines
382 B
TypeScript
14 lines
382 B
TypeScript
import React from "react";
|
|
import { ArmorFull, ArmorHelmet } from "./../../assets/Icons";
|
|
|
|
const Armor = ({ health, armor, helmet }: { health: number, armor: number, helmet: boolean }) => {
|
|
if (!health || !armor) return null;
|
|
return (
|
|
<div className={`armor_indicator`}>
|
|
{helmet ? <ArmorHelmet /> : <ArmorFull />}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default React.memo(Armor);
|