From 52c185d0f23504fc6410cf36285968eff9e7b21f Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 22 Apr 2022 18:07:26 +0200
Subject: chore: add a Header component

---
 src/components/organisms/layout/header.tsx | 35 ++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 src/components/organisms/layout/header.tsx

(limited to 'src/components/organisms/layout/header.tsx')

diff --git a/src/components/organisms/layout/header.tsx b/src/components/organisms/layout/header.tsx
new file mode 100644
index 0000000..f6ebc9c
--- /dev/null
+++ b/src/components/organisms/layout/header.tsx
@@ -0,0 +1,35 @@
+import Branding, {
+  type BrandingProps,
+} from '@components/molecules/layout/branding';
+import { FC } from 'react';
+import Toolbar, { type ToolbarProps } from '../toolbar/toolbar';
+import styles from './header.module.scss';
+
+export type HeaderProps = BrandingProps & {
+  /**
+   * Set additional classnames to the header element.
+   */
+  className?: string;
+  /**
+   * The main nav items.
+   */
+  nav: ToolbarProps['nav'];
+};
+
+/**
+ * Header component
+ *
+ * Render the website header.
+ */
+const Header: FC<HeaderProps> = ({ className, nav, ...props }) => {
+  return (
+    <header className={`${styles.wrapper} ${className}`}>
+      <div className={styles.body}>
+        <Branding {...props} />
+        <Toolbar nav={nav} className={styles.toolbar} />
+      </div>
+    </header>
+  );
+};
+
+export default Header;
-- 
cgit v1.2.3

