mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-12 11:46:40 +00:00
variable progress bar color
This commit is contained in:
parent
10523c588c
commit
0b4b605280
1 changed files with 12 additions and 1 deletions
|
|
@ -16,7 +16,18 @@ export const ProgressBar: FC<ProgressBarProps> = ({
|
||||||
remainingDays
|
remainingDays
|
||||||
}) => {
|
}) => {
|
||||||
const styleString: CSSProperties = { width: `${value}%` };
|
const styleString: CSSProperties = { width: `${value}%` };
|
||||||
const barColor: string = value < 75 ? "red" : "";
|
let barColor: string = "green";
|
||||||
|
|
||||||
|
if (value < 100) {
|
||||||
|
barColor = "yellow";
|
||||||
|
}
|
||||||
|
if (value < 200 / 3) {
|
||||||
|
barColor = "orange";
|
||||||
|
}
|
||||||
|
if (value < 100 / 3) {
|
||||||
|
barColor = "red";
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue