FlightStatus icon colors: use brand palette (Angular statusColors parity)
This commit is contained in:
@@ -20,20 +20,26 @@ const STATUS_CLASSES: Record<FlightStatusType, string> = {
|
||||
Unknown: "flight-status--unknown",
|
||||
};
|
||||
|
||||
// Mirrors Angular's `flight-status-colors.ts` palette via the brand
|
||||
// color tokens (see `src/styles/_colors.scss`): Delayed uses $orange,
|
||||
// Cancelled uses $red, and every in-flight / landed / arrived / sent /
|
||||
// unknown state uses $green. Scheduled falls through to $blue, which is
|
||||
// what Angular's statusColors.scheduled ('blue') resolves to.
|
||||
function statusColor(status: FlightStatusType): string {
|
||||
switch (status) {
|
||||
case "Delayed":
|
||||
return "#f37b09"; // $orange
|
||||
case "Cancelled":
|
||||
return "#c8102e"; // $red
|
||||
case "Arrived":
|
||||
case "Landed":
|
||||
return "#6da244";
|
||||
case "Sent":
|
||||
case "InFlight":
|
||||
return "#2457ff";
|
||||
case "Cancelled":
|
||||
return "#e55353";
|
||||
case "Delayed":
|
||||
return "#f29f3a";
|
||||
case "Unknown":
|
||||
return "#25a24e"; // $green
|
||||
case "Scheduled":
|
||||
default:
|
||||
return "#2457ff";
|
||||
return "#1b62b4"; // $blue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user