From 894621cbf347485010de612b0f7fec74bdd26778 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 14 Apr 2022 22:30:45 +0200 Subject: chore: add a Toolbar component --- src/components/organisms/toolbar/toolbar.tsx | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/components/organisms/toolbar/toolbar.tsx (limited to 'src/components/organisms/toolbar/toolbar.tsx') diff --git a/src/components/organisms/toolbar/toolbar.tsx b/src/components/organisms/toolbar/toolbar.tsx new file mode 100644 index 0000000..81e80cf --- /dev/null +++ b/src/components/organisms/toolbar/toolbar.tsx @@ -0,0 +1,51 @@ +import { useState, VFC } from 'react'; +import MainNav, { type MainNavProps } from '../toolbar/main-nav'; +import Search from '../toolbar/search'; +import Settings from '../toolbar/settings'; +import styles from './toolbar.module.scss'; + +export type ToolbarProps = { + /** + * Set additional classnames to the toolbar wrapper. + */ + className?: string; + /** + * The main nav items. + */ + nav: MainNavProps['items']; +}; + +/** + * Toolbar component + * + * Render the website toolbar. + */ +const Toolbar: VFC = ({ className = '', nav }) => { + const [isNavOpened, setIsNavOpened] = useState(false); + const [isSettingsOpened, setIsSettingsOpened] = useState(false); + const [isSearchOpened, setIsSearchOpened] = useState(false); + + return ( +
+ + + +
+ ); +}; + +export default Toolbar; -- cgit v1.2.3