aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/toolbar/toolbar.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-15 16:36:58 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-15 16:36:58 +0200
commit235fe67d770f83131c9ec10b99012319440db690 (patch)
tree3b96e2c8a5877fe15a9cfa6bff46130fa7a04a65 /src/components/organisms/toolbar/toolbar.tsx
parentfe2252ced2bb895e26179640553b5a6c02957d54 (diff)
chore: add Search page
Diffstat (limited to 'src/components/organisms/toolbar/toolbar.tsx')
-rw-r--r--src/components/organisms/toolbar/toolbar.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/organisms/toolbar/toolbar.tsx b/src/components/organisms/toolbar/toolbar.tsx
index f1ce530..6593055 100644
--- a/src/components/organisms/toolbar/toolbar.tsx
+++ b/src/components/organisms/toolbar/toolbar.tsx
@@ -1,10 +1,10 @@
import { FC, useState } from 'react';
import MainNav, { type MainNavProps } from '../toolbar/main-nav';
-import Search from '../toolbar/search';
+import Search, { type SearchProps } from '../toolbar/search';
import Settings from '../toolbar/settings';
import styles from './toolbar.module.scss';
-export type ToolbarProps = {
+export type ToolbarProps = Pick<SearchProps, 'searchPage'> & {
/**
* Set additional classnames to the toolbar wrapper.
*/
@@ -20,7 +20,7 @@ export type ToolbarProps = {
*
* Render the website toolbar.
*/
-const Toolbar: FC<ToolbarProps> = ({ className = '', nav }) => {
+const Toolbar: FC<ToolbarProps> = ({ className = '', nav, searchPage }) => {
const [isNavOpened, setIsNavOpened] = useState<boolean>(false);
const [isSettingsOpened, setIsSettingsOpened] = useState<boolean>(false);
const [isSearchOpened, setIsSearchOpened] = useState<boolean>(false);
@@ -34,6 +34,7 @@ const Toolbar: FC<ToolbarProps> = ({ className = '', nav }) => {
className={styles.modal}
/>
<Search
+ searchPage={searchPage}
isActive={isSearchOpened}
setIsActive={setIsSearchOpened}
className={`${styles.modal} ${styles['modal--search']}`}