This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
servicepoint-tanks/tank-frontend/src/components/Button.tsx
2024-04-14 11:16:34 +02:00

17 lines
427 B
TypeScript

import './Button.css';
import {MouseEventHandler} from "react";
export default function Button({text, onClick, className, disabled}: {
text: string,
onClick?: MouseEventHandler<HTMLButtonElement>,
className?: string,
disabled?: boolean
}) {
return <button
className={'Button ' + (className ?? '')}
onClick={onClick}
disabled={disabled ?? false}
>
{text}
</button>
}