Spaces:
Sleeping

File size: 626 Bytes
0ebc8c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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";