diff options
Diffstat (limited to 'src/components/organisms/toolbar/toolbar.tsx')
| -rw-r--r-- | src/components/organisms/toolbar/toolbar.tsx | 7 |
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']}`} |
