Initial commit
Next.js + Express event management app for Hope Family Church.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import React from "react";
|
||||
|
||||
export type Role = "user" | "staff" | "supervisor" | "admin";
|
||||
|
||||
export function RoleBadge({ role, className = "" }: { role: Role; className?: string }) {
|
||||
const colors: Record<Role, string> = {
|
||||
user: "bg-gray-100 text-gray-800",
|
||||
staff: "bg-indigo-100 text-indigo-800",
|
||||
supervisor: "bg-emerald-100 text-emerald-800",
|
||||
admin: "bg-red-100 text-red-800",
|
||||
};
|
||||
return (
|
||||
<span className={["inline-flex items-center rounded px-2 py-0.5 text-xs font-medium", colors[role], className]
|
||||
.filter(Boolean)
|
||||
.join(" ")}
|
||||
>
|
||||
{role}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user