(
value: number,
thresholds: { green: number; yellow: number },
options: { defaultColor?: string } = {},
)
| 19 | |
| 20 | // --- Color Logic --- |
| 21 | export const getStatusColor = ( |
| 22 | value: number, |
| 23 | thresholds: { green: number; yellow: number }, |
| 24 | options: { defaultColor?: string } = {}, |
| 25 | ) => { |
| 26 | if (value >= thresholds.green) { |
| 27 | return Colors.AccentGreen; |
| 28 | } |
| 29 | if (value >= thresholds.yellow) { |
| 30 | return Colors.AccentYellow; |
| 31 | } |
| 32 | return options.defaultColor || Colors.AccentRed; |
| 33 | }; |
no outgoing calls
no test coverage detected