diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-17 23:28:17 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-17 23:28:17 +0100 |
| commit | efed6c0a820c5c47e097fa29455157bbd318ffca (patch) | |
| tree | 0c52968f8619ce62ba6f442c84dec10fbce4214d /src/components/Form/Form.tsx | |
| parent | 42315639d14ead79b5fac04508df8be793bbbc0b (diff) | |
chore: create mutation to send mail from contact form
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> ); |
