From b94b9b41f113da17f232a7d1044dedadd87e0c89 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 14 Apr 2022 19:43:35 +0200
Subject: chore: add a SearchModal component

---
 src/components/organisms/modals/search-modal.tsx | 34 ++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 src/components/organisms/modals/search-modal.tsx

(limited to 'src/components/organisms/modals/search-modal.tsx')

diff --git a/src/components/organisms/modals/search-modal.tsx b/src/components/organisms/modals/search-modal.tsx
new file mode 100644
index 0000000..883b783
--- /dev/null
+++ b/src/components/organisms/modals/search-modal.tsx
@@ -0,0 +1,34 @@
+import Modal from '@components/molecules/modals/modal';
+import { VFC } from 'react';
+import { useIntl } from 'react-intl';
+import SearchForm from '../forms/search-form';
+import styles from './search-modal.module.scss';
+
+export type SearchModalProps = {
+  /**
+   * Set additional classnames to modal wrapper.
+   */
+  className?: string;
+};
+
+/**
+ * SearchModal
+ *
+ * Render a search form modal.
+ */
+const SearchModal: VFC<SearchModalProps> = ({ className }) => {
+  const intl = useIntl();
+  const modalTitle = intl.formatMessage({
+    defaultMessage: 'Search',
+    description: 'SearchModal: modal title',
+    id: 'G+Twgm',
+  });
+
+  return (
+    <Modal title={modalTitle} className={`${styles.wrapper} ${className}`}>
+      <SearchForm hideLabel={true} />
+    </Modal>
+  );
+};
+
+export default SearchModal;
-- 
cgit v1.2.3

