TTime/frontend/src/Components/Button.tsx

22 lines
559 B
TypeScript
Raw Normal View History

2024-03-07 11:48:34 +01:00
function Button({
text,
onClick,
2024-03-15 14:30:45 +01:00
type,
2024-03-07 11:48:34 +01:00
}: {
text: string;
onClick: () => void;
2024-03-15 14:30:45 +01:00
type: "submit" | "button" | "reset";
2024-03-07 11:48:34 +01:00
}): JSX.Element {
return (
<button
onClick={onClick}
className="inline-block py-1 px-8 font-bold bg-orange-500 text-white border-2 border-black rounded-full cursor-pointer mt-5 mb-5 transition-colors duration-10 hover:bg-orange-600 hover:text-gray-300 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 4vh;"
2024-03-15 14:30:45 +01:00
type={type}
2024-03-07 11:48:34 +01:00
>
{text}
</button>
);
}
2024-03-07 11:48:34 +01:00
export default Button;