Files
gridpilot.gg/apps/website/ui/Form.tsx
Marc Mintel 9894c4a841
Some checks failed
CI / lint-typecheck (pull_request) Failing after 13s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
code quality
2026-01-27 16:30:03 +01:00

33 lines
657 B
TypeScript

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