Files
the-biergarten-app/src/components/ui/forms/Button.tsx
2023-06-01 20:20:45 -04:00

25 lines
482 B
TypeScript

import { FunctionComponent } from 'react';
interface FormButtonProps {
children: string;
type: 'button' | 'submit' | 'reset';
isSubmitting?: boolean;
}
const Button: FunctionComponent<FormButtonProps> = ({
children,
type,
isSubmitting = false,
}) => (
// eslint-disable-next-line react/button-has-type
<button
type={type}
className={`btn-primary btn w-full rounded-xl`}
disabled={isSubmitting}
>
{children}
</button>
);
export default Button;