diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-14 19:43:35 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-14 19:43:35 +0200 |
| commit | b94b9b41f113da17f232a7d1044dedadd87e0c89 (patch) | |
| tree | 3b589c7b3b18e9cf6c9d62339f647aad33609ba5 /src/components/organisms/modals/search-modal.tsx | |
| parent | 70b4e5c311999501cd6eff632ddbcac6e75ff035 (diff) | |
chore: add a SearchModal component
Diffstat (limited to 'src/components/organisms/modals/search-modal.tsx')
| -rw-r--r-- | src/components/organisms/modals/search-modal.tsx | 34 |
1 files changed, 34 insertions, 0 deletions
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; |
