Skip to content

Commit

Permalink
add header
Browse files Browse the repository at this point in the history
  • Loading branch information
OybekKayumov committed May 10, 2022
1 parent 479b264 commit 2a1eb3c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
Binary file added src/assets/planet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { NavLink } from 'react-router-dom';
import planet from '../assets/planet.png';
import styles from './Header.module.css';

const Header = () => {
return {
<header>
<NavLink to="/">
<img src={planet} alt="logo" className="logo-img" />
<h1 className="title">Space Travelers Hub</h1>
</NavLink>
<nav className="header__nav">
<ul>
<li>
<NavLink
className={({ isActive }) => ( isActive ? 'active' : '')}
to="/rockets"
>
Rockets
</NavLink>
</li>
<li>
<NavLink
className={({ isActive }) => ( isActive ? 'active' : '')}
to="/profile"
>
Profile
</NavLink>
</li>
</ul>
</nav>
</header>
}
};

export default Header;
5 changes: 5 additions & 0 deletions src/components/Header.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}

0 comments on commit 2a1eb3c

Please sign in to comment.