diff options
Diffstat (limited to 'src/components/Form/Form.tsx')
| -rw-r--r-- | src/components/Form/Form.tsx | 16 | 
1 files changed, 9 insertions, 7 deletions
| diff --git a/src/components/Form/Form.tsx b/src/components/Form/Form.tsx index cc97526..5e26e81 100644 --- a/src/components/Form/Form.tsx +++ b/src/components/Form/Form.tsx @@ -1,13 +1,15 @@ -import { FormEvent } from 'react'; +import { ReactNode } from 'react';  import styles from './Form.module.scss'; -const Form: React.FunctionComponent = ({ children }) => { -  const submitForm = (e: FormEvent) => { -    e.preventDefault(); -  }; - +const Form = ({ +  children, +  submitHandler, +}: { +  children: ReactNode; +  submitHandler: any; +}) => {    return ( -    <form onSubmit={submitForm} className={styles.wrapper}> +    <form onSubmit={submitHandler} className={styles.wrapper}>        {children}      </form>    ); | 
