Spaces:
Build error
Build error
File size: 951 Bytes
b59aa07 |
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 |
import { FaClock } from "react-icons/fa";
import CheckCircle from "#/icons/check-circle-solid.svg?react";
import XCircle from "#/icons/x-circle-solid.svg?react";
import { ObservationResultStatus } from "./event-content-helpers/get-observation-result";
interface SuccessIndicatorProps {
status: ObservationResultStatus;
}
export function SuccessIndicator({ status }: SuccessIndicatorProps) {
return (
<span className="flex-shrink-0">
{status === "success" && (
<CheckCircle
data-testid="status-icon"
className="h-4 w-4 ml-2 inline fill-success"
/>
)}
{status === "error" && (
<XCircle
data-testid="status-icon"
className="h-4 w-4 ml-2 inline fill-danger"
/>
)}
{status === "timeout" && (
<FaClock
data-testid="status-icon"
className="h-4 w-4 ml-2 inline fill-yellow-500"
/>
)}
</span>
);
}
|