Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 1x | const Button = ({
children,
onClick,
disabled = false,
className = "",
variant = "primary",
}: {
children: React.ReactNode;
onClick?: () => void;
disabled?: boolean;
className?: string;
variant?: "primary" | "secondary";
}) => {
const variantClasses =
variant === "primary" ? "bg-blue-500 text-white" : "bg-gray-500 text-black";
return (
<button
className={`${variantClasses} ${className} rounded p-2`}
disabled={disabled}
onClick={onClick}
>
{children}
</button>
);
};
export default Button;
|