Download src/components/ui/button.jsx from guisousa/BaseAdmin: direct link, hf CLI and curl.
- Browser
- Download file 626 Bytes
-
https://huggingface.co/spaces/guisousa/BaseAdmin/resolve/main/src/components/ui/button.jsx
- Command line
-
hf download hf://spaces/guisousa/BaseAdmin/src/components/ui/button.jsx
-
curl -L -o button.jsx https://huggingface.co/spaces/guisousa/BaseAdmin/resolve/main/src/components/ui/button.jsx
626 Bytes
| import React from "react"; | |
| const base = "inline-flex items-center justify-center gap-2 px-4 h-10 rounded-xl text-sm transition"; | |
| const variants = { | |
| default: "bg-black text-white hover:bg-gray-800", | |
| outline: "border border-black bg-transparent hover:bg-black/5", | |
| ghost: "hover:bg-black/5", | |
| destructive: "bg-red-600 text-white hover:bg-red-700", | |
| }; | |
| export const Button = React.forwardRef(({ variant = "default", className = "", ...props }, ref) => { | |
| const v = variants[variant] || variants.default; | |
| return <button ref={ref} className={`${base} ${v} ${className}`} {...props} />; | |
| }); | |
| Button.displayName = "Button"; | |