mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
Adds a validation schema for the application's environment variables using the Zod library. The parsed environment variables are then exported as constants that can be imported throughout the application, replacing the direct use of process.env.
24 lines
487 B
TypeScript
24 lines
487 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 ${isSubmitting ? 'loading' : ''}`}
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
|
|
export default Button;
|