Files
gridpilot.gg/apps/website/ui/Form.tsx
2026-01-19 18:01:30 +01:00

30 lines
584 B
TypeScript

import React, { ReactNode, FormEventHandler, forwardRef } from 'react';
export interface FormProps {
children: ReactNode;
onSubmit?: FormEventHandler<HTMLFormElement>;
noValidate?: boolean;
className?: string;
}
export const Form = forwardRef<HTMLFormElement, FormProps>(({
children,
onSubmit,
noValidate = true,
className
}, ref) => {
return (
<form
ref={ref}
onSubmit={onSubmit}
noValidate={noValidate}
className={className}
style={{ width: '100%' }}
>
{children}
</form>
);
});
Form.displayName = 'Form';