Fixed props warning

pull/179/head
Vladimir Volek 6 years ago
parent b2fec821ca
commit 672429c62c

@ -37,7 +37,7 @@ const A = styled.a`
const StyledNavLink = styled(NavLink)`
${props => props.isGreen && css`
color: ${colors.GREEN_PRIMARY};
color: ${colors.GREEN_PRIMARY};
`}
${props => props.isGray && css`
@ -51,12 +51,7 @@ class Link extends PureComponent {
let LinkComponent;
if (shouldRenderRouterLink) {
LinkComponent = (
<StyledNavLink
isGreen={this.props.isGreen}
isGray={this.props.isGray}
to={this.props.to}
>{this.props.children}
</StyledNavLink>);
<StyledNavLink {...this.props}>{this.props.children}</StyledNavLink>);
} else {
LinkComponent = (
<A
@ -92,9 +87,4 @@ Link.propTypes = {
isGray: PropTypes.bool,
};
Link.defaultProps = {
isGreen: false,
isGray: false,
};
export default Link;

Loading…
Cancel
Save