27 lines
687 B
TypeScript
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>
|
|
);
|
|
}
|