Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

529 B
Raw Blame
import { Badge } from "@/components/ui/badge";
import { useInstanceRoleLabel } from "./use-instance-role-label";

type UserRoleBadgeProps = {
  role: string;
};

export function UserRoleBadge({ role }: UserRoleBadgeProps) {
  const roleLabel = useInstanceRoleLabel();

  return role === "user" ? (
    <Badge variant="secondary" className="px-1.5 text-muted-foreground">
      {roleLabel(role)}
    </Badge>
  ) : (
    <Badge variant="outline" className="max-w-full truncate px-1.5">
      {roleLabel(role)}
    </Badge>
  );
}