Spaces:
Sleeping

BaseAdmin / src /components /ui /badge.jsx
guisousa's picture
Update src/components/ui/badge.jsx
ea934b5 verified
Raw History Blame Contribute Delete
525 Bytes
import React from "react";
const variants = {
default: "bg-black text-white",
secondary: "bg-gray-200 text-gray-900",
success: "bg-green-100 text-green-800",
warning: "bg-yellow-100 text-yellow-800",
destructive: "bg-red-100 text-red-700",
};
export function Badge({ variant = "default", className = "", ...props }) {
const v = variants[variant] || variants.default;
return (
<span className={`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${v} ${className}`} {...props} />
);
}