mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-09 21:14:22 +00:00
Findings page Status component (#34)
* feat(findings): Severity and Status badge WIP * Remove SeverityBadge from PR
This commit is contained in:
@@ -1,14 +1,25 @@
|
||||
import { Chip } from "@nextui-org/react";
|
||||
import React from "react";
|
||||
|
||||
type Status = "completed" | "pending" | "cancelled";
|
||||
type Status =
|
||||
| "completed"
|
||||
| "pending"
|
||||
| "cancelled"
|
||||
| "fail"
|
||||
| "success"
|
||||
| "muted";
|
||||
|
||||
export const statusColorMap: Record<Status, "success" | "danger" | "warning"> =
|
||||
{
|
||||
completed: "success",
|
||||
pending: "warning",
|
||||
cancelled: "danger",
|
||||
};
|
||||
export const statusColorMap: Record<
|
||||
Status,
|
||||
"success" | "danger" | "warning" | "default"
|
||||
> = {
|
||||
completed: "success",
|
||||
pending: "warning",
|
||||
cancelled: "danger",
|
||||
fail: "danger",
|
||||
success: "success",
|
||||
muted: "default",
|
||||
};
|
||||
|
||||
export const StatusBadge = ({ status }: { status: Status }) => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user