diff --git a/app/components/LoadingBar.tsx b/app/components/LoadingBar.tsx
new file mode 100644
index 0000000000..cf2969c641
--- /dev/null
+++ b/app/components/LoadingBar.tsx
@@ -0,0 +1,47 @@
+import { twMerge } from 'tailwind-merge';
+import { H4 } from '.';
+
+interface LoadingBarProps{
+ label?: string;
+ progress?: number;
+ variant?: string;
+ pulsing?: boolean;
+ message?: string;
+}
+export const LoadingBar = ({
+ label,
+ progress = 50,
+ variant = 'primary',
+ pulsing = false,
+ message,
+}: LoadingBarProps) => {
+
+ function getVariantClassNames(variant: string) {
+ switch (variant) {
+ case "secondary": {
+ return " bg-brand-secondary text-white ";
+ }
+ case "primary":
+ default: {
+ return " bg-brand-primary text-white ";
+ }
+ }
+ }
+ const progressClassName = twMerge(
+ "h-2.5 rounded-full",
+ getVariantClassNames(variant),
+ );
+
+ return (
+
+ {label &&
}
+
+ {message &&
{message}
}
+
+ );
+}
\ No newline at end of file
diff --git a/app/components/index.tsx b/app/components/index.tsx
index 28c7eb3efc..2065c8c20c 100644
--- a/app/components/index.tsx
+++ b/app/components/index.tsx
@@ -6,6 +6,7 @@ import { Input } from "./Input";
import { H4 } from "./H4";
import { ItemPicker } from "./ItemPicker";
import { Textarea } from "./Textarea";
+import { LoadingBar } from "./LoadingBar";
import { LoadingDotsBricks, LoadingDotsTyping } from "./LoadingDots";
export {
@@ -17,6 +18,7 @@ export {
ItemPicker,
Textarea,
Input,
+ LoadingBar,
LoadingDotsBricks,
LoadingDotsTyping,
};
diff --git a/app/routes/ComponentLibrary.tsx b/app/routes/ComponentLibrary.tsx
index 41bbfb7f8d..54814f8451 100644
--- a/app/routes/ComponentLibrary.tsx
+++ b/app/routes/ComponentLibrary.tsx
@@ -1,11 +1,33 @@
-import { Button } from "~/components/Button";
-import { ButtonLink } from "~/components/ButtonLink";
+import {
+ Button,
+ ButtonLink,
+ H4,
+ LoadingBar
+} from "~/components";
+
export default function ComponentLibrary () {
return(
- <>
-
- Button with Link
- >
+
+
+
+
Buttons
+
+
+
+
+
+
+
+
+
ButtonLink
+ Back to /
+
+
+
+
Loading Bar
+
+
+
);
};
\ No newline at end of file