StatusBar Color update

This commit is contained in:
Amira24523
2023-06-21 22:32:57 +02:00
parent 024d22711f
commit ee5805434d
2 changed files with 19 additions and 13 deletions
+17 -5
View File
@@ -5,18 +5,30 @@ import {console} from "next/dist/compiled/@edge-runtime/primitives/console";
export default function StatusBar(p)
{
if(p.progress > 100) p.progress = 100;
let classNames = ["not-started", "started", "finished"];
let classNames = ["not-started"];
let index = p.progress / 50;
let index2 = p.progress / 100;
let index3 = p.progress - 100;
let index4 = p.progress - 50;
let actives = ["", "", ""]
let actives = ["", "", ""];
actives[index] = "active";
let actives2 = ["", "", ""];
actives2[index2] = "finished";
let actives3 = ["", "", ""];
actives3[index3] = "finished";
let actives4 = ["", "", ""];
actives4[index4] = "finished";
return (
<div className={"step-container"}>
<div className={"steps"}>
<span className={"step " + classNames[0] + " " + actives[0]}>1</span>
<span className={"step " + classNames[1] + " " + actives[1]}>2</span>
<span className={"step " + classNames[2] + " " + actives[2]}>3</span>
<span className={"step " + classNames[0] + " " + actives[0] + actives2[0] + actives3[0] + actives4[0]}>1</span>
<span className={"step " + classNames[0] + " " + actives[1] + actives2[1] + actives3[1] + actives4[1]}>2</span>
<span className={"step " + classNames[0] + " " + actives[2] + actives2[2] + actives3[2] + actives4[2]}>3</span>
<div className={"progress-bar " + classNames[index]}
style={{
width: p.progress + "%"
+2 -8
View File
@@ -188,16 +188,10 @@ Step Progress Bar
.steps .not-started {
/*background-image: linear-gradient(#b42121, #b44821);*/
background-color: #77932b;
background-color: grey;
}
.steps .started {
/*background-image: linear-gradient(#c75c0c, #c77c0c);*/
background-color: #77932b;
}
.steps .finished {
/*background-image: linear-gradient(#43C20BFF, #0bc27c);*/
background-color: #77932b;
@@ -213,7 +207,7 @@ Step Progress Bar
.progress-bar {
position: absolute;
height: 8px;
background-color: #5d606e;
background-color: #77932b;
z-index: 100;
}