-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathNavBar.jsx
More file actions
38 lines (34 loc) · 1.07 KB
/
NavBar.jsx
File metadata and controls
38 lines (34 loc) · 1.07 KB
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
import ThemeToggle from '@node-core/ui-components/Common/ThemeToggle';
import NavBar from '@node-core/ui-components/Containers/NavBar';
import styles from '@node-core/ui-components/Containers/NavBar/index.module.css';
import GitHubIcon from '@node-core/ui-components/Icons/Social/GitHub';
import SearchBox from './SearchBox';
import { STATIC_DATA } from '../constants.mjs';
import { useTheme } from '../hooks/useTheme.mjs';
import Logo from '#config/Logo';
/**
* NavBar component that displays the headings, search, etc.
*/
export default () => {
const [themePreference, setThemePreference] = useTheme();
return (
<NavBar
Logo={Logo}
sidebarItemTogglerAriaLabel="Toggle navigation menu"
navItems={[]}
>
<SearchBox />
<ThemeToggle
onChange={setThemePreference}
currentTheme={themePreference}
/>
<a
href={`https://github.com/${STATIC_DATA.repository}`}
aria-label={`${STATIC_DATA.title} GitHub`}
className={styles.ghIconWrapper}
>
<GitHubIcon />
</a>
</NavBar>
);
};