blob: a76e957ddfaa313d9bded4b6f8b0c1c4f95f60d2 (
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
|
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"
/>
);
}
}
|