setHoveredVehicle(realtimeVehicle)}
+ onMouseLeave={() => setHoveredVehicle(null)}
+ style={
+ realtimeVehicle.active
+ ? { backgroundColor: 'white' }
+ : { backgroundColor: colors.greys.grey30 }
+ }
>
setIsHovered(true)}
- onMouseOut={() => setIsHovered(false)}
+ className="map__realtime-vehicle-tag-circle-inner"
style={
realtimeVehicle.active
- ? { backgroundColor: 'white' }
+ ? {
+ backgroundColor: getIconColor(
+ realtimeVehicle.mode.toLowerCase() as
+ | TransportMode
+ | LegMode
+ | 'ferry',
+ IconColorType.DEFAULT,
+ undefined,
+ ),
+ }
: { backgroundColor: colors.greys.grey30 }
}
>
-
- {realtimeVehicle.line.publicCode}
-
+ {realtimeVehicle.line.publicCode}