1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/active-class-name/components/Nav.js

32 lines
603 B
JavaScript

import Link from './Link';
import Head from 'next/head';
export default () => (
<nav>
<style jsx>{`
.active:after {
content: ' (current page)';
}
.nav-link {
text-decoration: none;
padding: 10px;
display: block;
}
`}</style>
<ul>
<li>
<Link activeClassName="active" href="/">
<a className="nav-link home-link">Home</a>
</Link>
</li>
<li>
<Link activeClassName="active" href="/about">
<a className="nav-link">About</a>
</Link>
</li>
</ul>
</nav>
);