Skip to content

Instantly share code, notes, and snippets.

@prof3ssorSt3v3
Created September 23, 2018 02:14
Show Gist options
  • Select an option

  • Save prof3ssorSt3v3/9284cb5c96b5839e9c492cf49f8d517c to your computer and use it in GitHub Desktop.

Select an option

Save prof3ssorSt3v3/9284cb5c96b5839e9c492cf49f8d517c to your computer and use it in GitHub Desktop.
import React, {Component} from 'react';
import NavLink from './NavLink';
import './NavLink.css';
class NavMenu extends Component{
render(){
let links = [
{label:"Home", url:"#home"},
{label:"Products", url:"#products"},
{label:"Services", url:"#services"},
{label:"Contact Us", url:"#contact"}
];
return (
<nav className="main-nav">
<NavLink info={links[0]}/>
<NavLink info={links[1]}/>
<NavLink info={links[2]} />
<NavLink info={links[3]} />
{/*
<a href="#home" className="main-link">Home</a>
<a href="#products" className="main-link">Products</a>
<a href="#services" className="main-link">Services</a>
<a href="#contact" className="main-link">Contact Us</a>
*/}
</nav>
)
}
}
export default NavMenu;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment