1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-30 20:28:09 +00:00

Fixed props warning

This commit is contained in:
Vladimir Volek 2018-10-15 14:36:56 +02:00
parent b2fec821ca
commit 672429c62c

View File

@ -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;