Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

574 B
Raw Blame
import { PlanProps } from "@/lib/types";
import { Badge } from "@dub/ui";
import { capitalize } from "@dub/utils";

export default function PlanBadge({ plan }: { plan: PlanProps }) {
  return (
    <Badge
      variant={
        plan === "enterprise"
          ? "violetGradient"
          : plan === "advanced"
            ? "amberGradient"
            : plan.startsWith("business")
              ? "blueGradient"
              : plan === "pro"
                ? "blueGradient"
                : "neutralGradient"
      }
    >
      {capitalize(plan)}
    </Badge>
  );
}