19 lines
381 B
TypeScript
19 lines
381 B
TypeScript
/**
|
|
* Incident Configuration
|
|
*
|
|
* UI display configuration for incident badges
|
|
*/
|
|
|
|
export interface IncidentConfigData {
|
|
color: string;
|
|
}
|
|
|
|
export const getIncidentBadgeColor = (incidents: number): string => {
|
|
if (incidents === 0) return 'green';
|
|
if (incidents <= 2) return 'yellow';
|
|
return 'red';
|
|
};
|
|
|
|
export const incidentConfig = {
|
|
getIncidentBadgeColor,
|
|
} as const; |