src/components/shared/Button.js (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
export default function Button({ children, variant = "primary", ...props }) { const variants = { primary: "bg-blue-700 hover:bg-blue-800 text-white", secondary: "bg-gray-200 hover:bg-gray-300 text-gray-800", }; return ( <button className={`px-3 py-1.5 rounded-md font-medium transition-colors disabled:cursor-not-allowed ${variants[variant]}`} {...props} > {children} </button> ); } |