Skip to content

Commit

Permalink
Add childProps prop to <BaseLink> as fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Nov 1, 2016
1 parent 8ac2f60 commit 445db74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/BaseLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const propTypes = {
exact: React.PropTypes.bool.isRequired,
target: React.PropTypes.string,
onClick: React.PropTypes.func,
childProps: React.PropTypes.object, // In case of name conflicts here.
};

const contextTypes = {
Expand Down Expand Up @@ -67,6 +68,7 @@ class BaseLink extends React.Component {
activeStyle,
activePropName,
exact,
childProps,
...props
} = this.props;

Expand Down Expand Up @@ -95,6 +97,7 @@ class BaseLink extends React.Component {
return (
<Component
{...props}
{...childProps}
href={router.createHref(to)}
onClick={this.onClick}
/>
Expand Down

0 comments on commit 445db74

Please sign in to comment.