mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 17:03:53 +00:00
refactor(timeline): style tweaks on status tags
This commit is contained in:
committed by
Carlos Valente
parent
70ce1d5553
commit
fa9695873a
@@ -93,15 +93,28 @@ $timeline-color: color-mix(in srgb, transparent 60%, var(--background-color-over
|
||||
&[data-status='live'] {
|
||||
box-shadow: 0 0.25rem 0 0 $active-red;
|
||||
.status {
|
||||
color: $active-red;
|
||||
padding: 0.125rem 0.25rem;
|
||||
border-radius: $component-border-radius-sm;
|
||||
background: $active-red;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-status='future'] {
|
||||
.status {
|
||||
color: $green-500;
|
||||
padding: 0.125rem 0.25rem;
|
||||
border-radius: $component-border-radius-sm;
|
||||
background: $green-500;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.status.due {
|
||||
background: $orange-600;
|
||||
}
|
||||
}
|
||||
|
||||
.delay {
|
||||
|
||||
@@ -150,7 +150,9 @@ function TimelineEntryStatus({
|
||||
statusText = getLocalizedString('timeline.due');
|
||||
}
|
||||
|
||||
return <div className={style.status}>{statusText}</div>;
|
||||
const isDue = status === 'future' && timeToStart <= 0;
|
||||
|
||||
return <div className={cx([style.status, isDue && style.due])}>{statusText}</div>;
|
||||
}
|
||||
|
||||
/** Generates a block level progress bar */
|
||||
|
||||
Reference in New Issue
Block a user