aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/ExecStatusIndicatorIcon.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-10 21:58:13 +0900
committernsfisis <nsfisis@gmail.com>2024-08-10 22:55:06 +0900
commit04ff82d35e9cbd3d2a86204260f58a370fda88da (patch)
tree3af529e1c4259d7cb8c5dbfa942de8e57bd75af1 /frontend/app/components/ExecStatusIndicatorIcon.tsx
parentb4ab693aa438f3f1a335369568aabe7849fc1370 (diff)
downloadiosdc-japan-2024-albatross-04ff82d35e9cbd3d2a86204260f58a370fda88da.tar.gz
iosdc-japan-2024-albatross-04ff82d35e9cbd3d2a86204260f58a370fda88da.tar.zst
iosdc-japan-2024-albatross-04ff82d35e9cbd3d2a86204260f58a370fda88da.zip
feat(frontend): show status indicator icon
Diffstat (limited to 'frontend/app/components/ExecStatusIndicatorIcon.tsx')
-rw-r--r--frontend/app/components/ExecStatusIndicatorIcon.tsx45
1 files changed, 45 insertions, 0 deletions
diff --git a/frontend/app/components/ExecStatusIndicatorIcon.tsx b/frontend/app/components/ExecStatusIndicatorIcon.tsx
new file mode 100644
index 0000000..a76e957
--- /dev/null
+++ b/frontend/app/components/ExecStatusIndicatorIcon.tsx
@@ -0,0 +1,45 @@
+import {
+ faBan,
+ faCircleCheck,
+ faCircleExclamation,
+ faRotate,
+} from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+
+type Props = {
+ status: string;
+};
+
+export default function ExecStatusIndicatorIcon({ status }: Props) {
+ switch (status) {
+ case "running":
+ return (
+ <FontAwesomeIcon
+ icon={faRotate}
+ spin
+ fixedWidth
+ className="text-gray-700"
+ />
+ );
+ case "success":
+ return (
+ <FontAwesomeIcon
+ icon={faCircleCheck}
+ fixedWidth
+ className="text-green-500"
+ />
+ );
+ case "canceled":
+ return (
+ <FontAwesomeIcon icon={faBan} fixedWidth className="text-gray-400" />
+ );
+ default:
+ return (
+ <FontAwesomeIcon
+ icon={faCircleExclamation}
+ fixedWidth
+ className="text-red-500"
+ />
+ );
+ }
+}