aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/ExecStatusIndicatorIcon.tsx
blob: c5b37f8a74131d461958e691a26a404f710c255e (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 { VerificationResultStatus } from "../models/VerificationResult";

type Props = {
	status: VerificationResultStatus;
};

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"
				/>
			);
	}
}