Download src/components/ui/badge.jsx from guisousa/BaseAdmin: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/spaces/guisousa/BaseAdmin/resolve/main/src/components/ui/badge.jsx
- Command line
-
hf download hf://spaces/guisousa/BaseAdmin/src/components/ui/badge.jsx
-
curl -L -o badge.jsx https://huggingface.co/spaces/guisousa/BaseAdmin/resolve/main/src/components/ui/badge.jsx
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} /> | |
| ); | |
| } | |