feat: initialize aivideo project
This commit is contained in:
31
frontend-admin/src/components/status-badge.tsx
Normal file
31
frontend-admin/src/components/status-badge.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import clsx from "clsx";
|
||||
|
||||
const tones: Record<string, string> = {
|
||||
paid: "success",
|
||||
pending: "soft",
|
||||
succeeded: "success",
|
||||
running: "warn",
|
||||
failed: "danger",
|
||||
unused: "success",
|
||||
used: "ghost",
|
||||
disabled: "danger",
|
||||
rewarded: "success",
|
||||
};
|
||||
|
||||
export function StatusBadge({ value }: { value: string }) {
|
||||
const tone = tones[value] ?? "soft";
|
||||
return (
|
||||
<span
|
||||
className={clsx("status-badge", {
|
||||
"tone-soft": tone === "soft",
|
||||
"tone-success": tone === "success",
|
||||
"tone-warn": tone === "warn",
|
||||
"tone-danger": tone === "danger",
|
||||
"tone-ghost": tone === "ghost",
|
||||
})}
|
||||
>
|
||||
{value}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user