mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
refactor: review timer styles
This commit is contained in:
committed by
Carlos Valente
parent
a69c5f354c
commit
7305edc398
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user