diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-10 22:55:17 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-10 22:55:17 +0900 |
| commit | 8ce2834a5bd2bbe799f6fab969cc1d9da6bdb588 (patch) | |
| tree | 3af529e1c4259d7cb8c5dbfa942de8e57bd75af1 /frontend/app/components/ExecStatusIndicatorIcon.tsx | |
| parent | a8f2594e8dcb741fb942092cbc53d64cf93132ef (diff) | |
| parent | 04ff82d35e9cbd3d2a86204260f58a370fda88da (diff) | |
| download | iosdc-japan-2024-albatross-8ce2834a5bd2bbe799f6fab969cc1d9da6bdb588.tar.gz iosdc-japan-2024-albatross-8ce2834a5bd2bbe799f6fab969cc1d9da6bdb588.tar.zst iosdc-japan-2024-albatross-8ce2834a5bd2bbe799f6fab969cc1d9da6bdb588.zip | |
Merge branch 'feat/watch-page'
Diffstat (limited to 'frontend/app/components/ExecStatusIndicatorIcon.tsx')
| -rw-r--r-- | frontend/app/components/ExecStatusIndicatorIcon.tsx | 45 |
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" + /> + ); + } +} |
