aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/header.tsx
blob: d2f76208a3285fe13df9a29ec58225386f3ff54e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { FC } from 'react';
import { Branding, type BrandingProps } from '../../molecules';
import { Toolbar, type ToolbarProps } from '../toolbar';
import styles from './header.module.scss';

export type HeaderProps = BrandingProps &
  Pick<
    ToolbarProps,
    'ackeeStorageKey' | 'motionStorageKey' | 'nav' | 'searchPage'
  > & {
    /**
     * Set additional classnames to the header element.
     */
    className?: string;
  };

/**
 * Header component
 *
 * Render the website header.
 */
export const Header: FC<HeaderProps> = ({
  ackeeStorageKey,
  className,
  motionStorageKey,
  nav,
  searchPage,
  ...props
}) => {
  return (
    <header className={`${styles.wrapper} ${className}`}>
      <div className={styles.body}>
        <Branding {...props} />
        <Toolbar
          ackeeStorageKey={ackeeStorageKey}
          className={styles.toolbar}
          motionStorageKey={motionStorageKey}
          nav={nav}
          searchPage={searchPage}
        />
      </div>
    </header>
  );
};