phase-0: scaffold backend and frontend shell
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface BadgeProps {
|
||||
variant?: "default" | "success" | "warning" | "danger" | "info" | "outline";
|
||||
className?: string;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const variantClasses = {
|
||||
default: "bg-gray-100 text-gray-800",
|
||||
success: "bg-green-100 text-green-800",
|
||||
warning: "bg-yellow-100 text-yellow-800",
|
||||
danger: "bg-red-100 text-red-800",
|
||||
info: "bg-blue-100 text-blue-800",
|
||||
outline: "border border-gray-300 text-gray-700 bg-white",
|
||||
};
|
||||
|
||||
export function Badge({ variant = "default", className, children }: BadgeProps) {
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",
|
||||
variantClasses[variant],
|
||||
className
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user