Skip to content

Instantly share code, notes, and snippets.

@lamosty
Created December 14, 2015 14:38
Show Gist options
  • Save lamosty/e4e9d8ebb925ebe428ab to your computer and use it in GitHub Desktop.
Save lamosty/e4e9d8ebb925ebe428ab to your computer and use it in GitHub Desktop.
MainNavigation dumb component from the Lexi React WP theme: https://github.com/lamosty/lexi/blob/master/src/components/MainNavigation.js
import React, { Component } from 'react';
import { Link } from 'react-router';
export default class MainNavigation extends Component {
render() {
return (
<div className="blog-masthead">
<div className="container">
<nav className="nav blog-nav">
<Link to="/" className="nav-link" activeClassName="active" onlyActiveOnIndex={true}>Home</Link>
<Link to="/2015/02/some-article" className="nav-link" activeClassName="active">Some Article</Link>
<Link to="/about" className="nav-link" activeClassName="active">About</Link>
</nav>
</div>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment