blob: b5c53ec95d2effefbaa7a5226442e6a96e62a0b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
import {
faBan,
faCircleCheck,
faCircleExclamation,
faRotate,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { ExecResultStatus } from "../models/ExecResult";
type Props = {
status: ExecResultStatus;
};
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"
/>
);
}
}
|