aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/forms/search-form
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-03 12:22:47 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:15:27 +0100
commit5d3e8a4d0c2ce2ad8f22df857ab3ce54fcfc38ac (patch)
treea758333b29e2e6614de609acb312ea9ff0d3a33b /src/components/organisms/forms/search-form
parent655be4404630a20ae4ca40c4af84afcc2e63557b (diff)
refactor(components): replace Toolbar with Navbar component
* remove SearchModal and SettingsModal components * add a generic NavbarItem component (instead of the previous toolbar items to avoid unreadable styles...) * move FlippingLabel component logic into NavbarItem since it is only used here
Diffstat (limited to 'src/components/organisms/forms/search-form')
-rw-r--r--src/components/organisms/forms/search-form/search-form.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/organisms/forms/search-form/search-form.tsx b/src/components/organisms/forms/search-form/search-form.tsx
index 1dcbb8c..5c685c0 100644
--- a/src/components/organisms/forms/search-form/search-form.tsx
+++ b/src/components/organisms/forms/search-form/search-form.tsx
@@ -14,6 +14,7 @@ import { LabelledField } from '../../../molecules';
import styles from './search-form.module.scss';
export type SearchFormProps = {
+ className?: string;
/**
* Should the label be visually hidden?
*
@@ -29,7 +30,7 @@ export type SearchFormProps = {
const SearchFormWithRef: ForwardRefRenderFunction<
HTMLInputElement,
SearchFormProps
-> = ({ isLabelHidden = false, searchPage }, ref) => {
+> = ({ className = '', isLabelHidden = false, searchPage }, ref) => {
const intl = useIntl();
const fieldLabel = intl.formatMessage({
defaultMessage: 'Search for:',
@@ -59,9 +60,10 @@ const SearchFormWithRef: ForwardRefRenderFunction<
}, []);
const id = useId();
+ const formClass = `${styles.wrapper} ${className}`;
return (
- <Form className={styles.wrapper} onSubmit={submitHandler}>
+ <Form className={formClass} onSubmit={submitHandler}>
<LabelledField
className={styles.field}
field={