TorbatYar/frontend/modules/commercial/components/Badges.tsx
2026-07-28 20:39:10 +03:30

27 lines
687 B
TypeScript

"use client";
import { Badge } from "@/components/ui";
export function PlanBadge({
label,
status,
}: {
label?: string | null;
status?: string | null;
}) {
if (!label && !status) return <Badge variant="default">بدون پلن</Badge>;
return (
<Badge variant={status === "active" || status === "trialing" ? "primary" : "default"}>
{label || status}
</Badge>
);
}
export function CapabilityBadge({ code, label }: { code: string; label?: string }) {
return (
<span className="inline-flex items-center rounded-full border border-gray-200 bg-white px-2.5 py-0.5 text-xs text-secondary">
{label || code}
</span>
);
}