mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-20 10:24:15 +00:00
* fix: add suppressHydrationWarning to resolve console errors * chore: add server-only library * WIP: Mock API for providers and start rendering data * chore: relocate utils folder to proper directory * chore: install shadcn for tables, adding sttings page * refactor: improve sidebar display behavior * chore: add fake data to the dataProviders * chore: remove the old table and rename ProviderInfo component * refactor: improve sidebar display behavior adding a custom hook * feat: the Providers table is rendering real data * chore: set the default valuef or isCollapse to false * chore: Added a helper function getProviderAttributes for cleaner access to provider attributes
26 lines
621 B
TypeScript
26 lines
621 B
TypeScript
import { Chip } from "@nextui-org/react";
|
|
import React from "react";
|
|
|
|
type Status = "completed" | "pending" | "cancelled";
|
|
|
|
export const statusColorMap: Record<Status, "success" | "danger" | "warning"> =
|
|
{
|
|
completed: "success",
|
|
pending: "warning",
|
|
cancelled: "danger",
|
|
};
|
|
|
|
export const StatusBadge = ({ status }: { status: Status }) => {
|
|
return (
|
|
<Chip
|
|
className="capitalize border-none gap-1 text-default-600"
|
|
// eslint-disable-next-line security/detect-object-injection
|
|
color={statusColorMap[status]}
|
|
size="sm"
|
|
variant="flat"
|
|
>
|
|
{status}
|
|
</Chip>
|
|
);
|
|
};
|