refactor: review timer styles

This commit is contained in:
Carlos Valente
2025-07-12 22:06:47 +02:00
committed by Carlos Valente
parent a69c5f354c
commit 7305edc398
13 changed files with 86 additions and 39 deletions
@@ -3,8 +3,13 @@ import { ViewSettings } from 'ontime-types';
/**
* Which colour should the timer have at a given moment
*/
export function getTimerColour(viewSettings: ViewSettings, showWarning: boolean, showDanger: boolean) {
export function getTimerColour(
viewSettings: ViewSettings,
timerColour: string | undefined,
showWarning: boolean,
showDanger: boolean,
) {
if (showWarning) return viewSettings.warningColor;
if (showDanger) return viewSettings.dangerColor;
return viewSettings.normalColor;
return timerColour || viewSettings.normalColor;
}