Created
February 1, 2020 23:19
-
-
Save paigen11/f580be93ed3f55283149b04baed7b557 to your computer and use it in GitHub Desktop.
React Socks breakpoints wrappers, which will render a header component or a totally different sidebar component based on the viewport size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Header = () => { | |
return ( | |
<nav className="navbar-wrapper"> | |
<Breakpoint medium up> | |
<ul className="navbar-links"> | |
<li className="navbar-link-logo"> | |
<NavLink to="/"> | |
<img src={TmdbIcon} alt="logo" /> | |
</NavLink> | |
</li> | |
<div className="navbar-top-links"> | |
<li className="navbar-link"> | |
<NavLink to="/nowplaying">Now Playing</NavLink> | |
</li> | |
<li className="navbar-link"> | |
<NavLink to="/upcoming">Coming Soon</NavLink> | |
</li> | |
<li className="navbar-link"> | |
<NavLink to="/search">Movie Search</NavLink> | |
</li> | |
<li className="navbar-link"> | |
<NavLink to="/genres">Genres</NavLink> | |
</li> | |
</div> | |
</ul> | |
</Breakpoint> | |
<Breakpoint small down> | |
<Sidebar /> | |
</Breakpoint> | |
</nav> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment