summaryrefslogtreecommitdiff
path: root/src2/components/elements/ProgressBar.js
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-03-01 09:18:52 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-03-01 09:18:52 +0000
commita7abbf4ddc70068620e9f44b74dc162ce2e16ee2 (patch)
tree74f66253717515d364ce74bd8275015c1f829cbc /src2/components/elements/ProgressBar.js
parent90e1edab9b6a8ccc09a49fed3addbec2cbc4e4c3 (diff)
parenta1b9b647a6c4bda1f5db63879639d44543f9557e (diff)
Merged in refactor (pull request #1)
Refactor
Diffstat (limited to 'src2/components/elements/ProgressBar.js')
-rw-r--r--src2/components/elements/ProgressBar.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src2/components/elements/ProgressBar.js b/src2/components/elements/ProgressBar.js
new file mode 100644
index 00000000..0adedcdf
--- /dev/null
+++ b/src2/components/elements/ProgressBar.js
@@ -0,0 +1,25 @@
+import { Fragment } from "react";
+
+const ProgressBar = ({ current, labels }) => {
+ return (
+ <div className="bg-gray_r-1 flex gap-x-2 p-4 rounded-md">
+ {labels.map((label, index) => (
+ <Fragment key={index}>
+ <div className={"flex gap-x-2 items-center " + (index < current ? 'text-gray_r-12' : 'text-gray_r-11')}>
+ <div className={"leading-none p-2 rounded-full w-7 text-center text-caption-2 " + (index < current ? 'bg-yellow_r-9' : 'bg-gray_r-5')}>
+ { index + 1 }
+ </div>
+ <p className="font-medium text-caption-2">{ label }</p>
+ </div>
+ { index < (labels.length - 1) && (
+ <div className="flex-1 flex items-center">
+ <div className="h-0.5 w-full bg-gray_r-7"></div>
+ </div>
+ ) }
+ </Fragment>
+ ))}
+ </div>
+ )
+}
+
+export default ProgressBar; \ No newline at end of file