Skip to content

Commit

Permalink
Also set the className when the site is active per @pieh's advice
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Aug 4, 2018
1 parent 96c1c92 commit 33583a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/gatsby-link/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class GatsbyLink extends React.Component {
getProps = ({ isCurrent }) =>
isCurrent
? {
className: this.props.activeClassName,
className: [this.props.className, this.props.activeClassName]
.filter(i => i)
.join(` `),
style: { ...this.props.style, ...this.props.activeStyle },
}
: null
Expand Down

0 comments on commit 33583a2

Please sign in to comment.