mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
refactor: improve fallback timer consistency
This commit is contained in:
committed by
Carlos Valente
parent
3d37f42fe0
commit
1061ed2a0e
@@ -16,4 +16,8 @@
|
||||
&.finished {
|
||||
color: $timer-finished-color;
|
||||
}
|
||||
|
||||
&.muted {
|
||||
color: $muted-gray;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default function TimerDisplay(props: TimerDisplayProps) {
|
||||
const isNegative = (time ?? 0) < 0;
|
||||
const display =
|
||||
time == null ? timerPlaceholder : millisToString(time, { fallback: timerPlaceholder }).replace('-', '');
|
||||
const classes = cx([style.timer, isNegative ? style.finished : null]);
|
||||
const classes = cx([style.timer, isNegative ? style.finished : null, time === null && style.muted]);
|
||||
|
||||
return <div className={classes}>{display}</div>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user