aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/modals/search-modal.tsx
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/modals/search-modal.tsx
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/modals/search-modal.tsx')
-rw-r--r--src/components/organisms/modals/search-modal.tsx45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/components/organisms/modals/search-modal.tsx b/src/components/organisms/modals/search-modal.tsx
deleted file mode 100644
index be9d489..0000000
--- a/src/components/organisms/modals/search-modal.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import { forwardRef, type ForwardRefRenderFunction } from 'react';
-import { useIntl } from 'react-intl';
-import { Heading } from '../../atoms';
-import { Modal, type ModalProps } from '../../molecules';
-import { SearchForm, type SearchFormProps } from '../forms';
-import styles from './search-modal.module.scss';
-
-export type SearchModalProps = SearchFormProps & {
- /**
- * Set additional classnames to modal wrapper.
- */
- className?: ModalProps['className'];
-};
-
-const SearchModalWithRef: ForwardRefRenderFunction<
- HTMLInputElement,
- SearchModalProps
-> = ({ className, searchPage }, ref) => {
- const intl = useIntl();
- const modalTitle = intl.formatMessage({
- defaultMessage: 'Search',
- description: 'SearchModal: modal title',
- id: 'G+Twgm',
- });
-
- return (
- <Modal
- className={`${styles.wrapper} ${className}`}
- heading={
- <Heading isFake level={3}>
- {modalTitle}
- </Heading>
- }
- >
- <SearchForm isLabelHidden ref={ref} searchPage={searchPage} />
- </Modal>
- );
-};
-
-/**
- * SearchModal
- *
- * Render a search form modal.
- */
-export const SearchModal = forwardRef(SearchModalWithRef);