mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-16 00:51:52 +00:00
4d5676f00e
Co-authored-by: Alan Buscaglia <alanbuscaglia@MacBook-Pro.local> Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com> Co-authored-by: César Arroba <cesar@prowler.com> Co-authored-by: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com>
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import { Card, CardBody } from "@heroui/card";
|
|
import { Chip } from "@heroui/chip";
|
|
|
|
import { getAWSIcon, NotificationIcon, SuccessIcon } from "../icons";
|
|
|
|
interface CardServiceProps {
|
|
fidingsFailed: number;
|
|
serviceAlias: string;
|
|
}
|
|
export const ServiceCard: React.FC<CardServiceProps> = ({
|
|
fidingsFailed,
|
|
serviceAlias,
|
|
}) => {
|
|
return (
|
|
<Card fullWidth isPressable isHoverable shadow="sm">
|
|
<CardBody className="flex flex-row items-center justify-between gap-4">
|
|
<div className="flex items-center gap-4">
|
|
{getAWSIcon(serviceAlias)}
|
|
<div className="flex flex-col">
|
|
<h4 className="text-md leading-5 font-bold">{serviceAlias}</h4>
|
|
<small className="text-default-500">
|
|
{fidingsFailed > 0
|
|
? `${fidingsFailed} Failed Findings`
|
|
: "No failed findings"}
|
|
</small>
|
|
</div>
|
|
</div>
|
|
|
|
<Chip
|
|
className="h-10"
|
|
variant="flat"
|
|
startContent={
|
|
fidingsFailed > 0 ? (
|
|
<NotificationIcon size={18} />
|
|
) : (
|
|
<SuccessIcon size={18} />
|
|
)
|
|
}
|
|
color={fidingsFailed > 0 ? "danger" : "success"}
|
|
radius="full"
|
|
size="md"
|
|
>
|
|
{fidingsFailed > 0 ? fidingsFailed : ""}
|
|
</Chip>
|
|
</CardBody>
|
|
</Card>
|
|
);
|
|
};
|