diff --git a/hera/Unit.tsx b/hera/Unit.tsx index 7f1c9c6..a57130f 100644 --- a/hera/Unit.tsx +++ b/hera/Unit.tsx @@ -109,11 +109,13 @@ const getAmmoStyle = (unit: Unit) => { const Action = ({ actionStyle, hide, + position, rescuer, unit, }: { actionStyle: ActionStyle | null; hide: boolean; + position?: 'secondary'; rescuer: PlayerID | null; unit: Unit; }) => { @@ -134,6 +136,7 @@ const Action = ({ absoluteStyle, baseIconStyle, statusStyle, + position === 'secondary' ? secondaryStyle : null, className, hide && hideStyle, )} @@ -160,6 +163,7 @@ const Status = ({ fuelStyle, hide, rescuer, + secondaryActionStyle, unit, }: { actionStyle: ActionStyle | null; @@ -167,9 +171,12 @@ const Status = ({ fuelStyle: FuelStyle | null; hide: boolean; rescuer: PlayerID | null; + secondaryActionStyle: ActionStyle | null; unit: Unit; }) => { const hasOne = !!(fuelStyle || ammoStyle); + const hasSecondaryAction = + secondaryActionStyle && secondaryActionStyle !== actionStyle; return ( <> + {hasSecondaryAction && ( + + )} {unit.health ? (