2024-04-13 23:07:08 +02:00
|
|
|
import './Button.css';
|
|
|
|
import {MouseEventHandler} from "react";
|
|
|
|
|
2024-04-14 11:16:34 +02:00
|
|
|
export default function Button({text, onClick, className, disabled}: {
|
2024-04-13 23:07:08 +02:00
|
|
|
text: string,
|
|
|
|
onClick?: MouseEventHandler<HTMLButtonElement>,
|
2024-04-14 11:16:34 +02:00
|
|
|
className?: string,
|
|
|
|
disabled?: boolean
|
2024-04-13 23:07:08 +02:00
|
|
|
}) {
|
|
|
|
return <button
|
|
|
|
className={'Button ' + (className ?? '')}
|
|
|
|
onClick={onClick}
|
2024-04-14 11:16:34 +02:00
|
|
|
disabled={disabled ?? false}
|
2024-04-13 23:07:08 +02:00
|
|
|
>
|
|
|
|
{text}
|
|
|
|
</button>
|
|
|
|
}
|