mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-19 10:01:25 -04:00
33 lines
724 B
JavaScript
33 lines
724 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import SearchBar from '../search/searchBar/SearchBar';
|
|
|
|
import NavigationMenu from './components/NavMenu';
|
|
import NavLogo from './components/NavLogo';
|
|
import { Link } from '../helpers';
|
|
|
|
import './header.css';
|
|
|
|
const propTypes = {
|
|
disableSettings: PropTypes.bool
|
|
};
|
|
|
|
function Header(props) {
|
|
const { disableSettings } = props;
|
|
return (
|
|
<header>
|
|
<nav id='top-nav'>
|
|
<Link className='home-link' to='/'>
|
|
<NavLogo />
|
|
</Link>
|
|
{disableSettings ? null : <SearchBar />}
|
|
<NavigationMenu disableSettings={disableSettings} />
|
|
</nav>
|
|
</header>
|
|
);
|
|
}
|
|
|
|
Header.propTypes = propTypes;
|
|
|
|
export default Header;
|