aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Form/Form.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-20 19:06:49 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-20 19:06:49 +0100
commit43cdb7607d9423109758334155acfe844eab6ea5 (patch)
tree0798fbb6f00bfbdbc3bd64759ffdb305dee43f0c /src/components/Form/Form.tsx
parentf9df5cbce7db38ce83cc8b40346c9cabde5debc4 (diff)
chore: define search form visibility
Diffstat (limited to 'src/components/Form/Form.tsx')
-rw-r--r--src/components/Form/Form.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/Form/Form.tsx b/src/components/Form/Form.tsx
index 5e26e81..dd1bc63 100644
--- a/src/components/Form/Form.tsx
+++ b/src/components/Form/Form.tsx
@@ -4,12 +4,19 @@ import styles from './Form.module.scss';
const Form = ({
children,
submitHandler,
+ modifier = '',
}: {
children: ReactNode;
submitHandler: any;
+ modifier?: string;
}) => {
+ const classes =
+ modifier !== ''
+ ? `${styles.wrapper} ${styles[`wrapper--${modifier}`]}`
+ : styles.wrapper;
+
return (
- <form onSubmit={submitHandler} className={styles.wrapper}>
+ <form onSubmit={submitHandler} className={classes}>
{children}
</form>
);