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 | 1x | import React from "react";
type CustomButtonTypes = {
children: React.ReactNode;
onClick: React.MouseEventHandler<HTMLButtonElement>;
className?: string;
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
function CustomButton({
children,
onClick,
className,
...props
}: CustomButtonTypes) {
return (
<button
onClick={onClick}
className={`${className} flex text-center gap-1 items-center text-xs bg-white hover:bg-violet-500 text-violet-500 hover:text-white rounded p-1 border border-violet-500 shrink-0 transition-all`}
{...props}>
{children}
</button>
);
}
export default CustomButton;
|