Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

activeProps breaks merging of classNames on styled-components #213

Open
medeeiros opened this issue Jul 21, 2017 · 0 comments
Open

activeProps breaks merging of classNames on styled-components #213

medeeiros opened this issue Jul 21, 2017 · 0 comments

Comments

@medeeiros
Copy link

import { Link } from 'redux-little-router'
import styled from 'styled-components'

const StyledLink = styled(Link)`
    color: red;
`

// styled component
<StyledLink href="/">Home</StyledLink> 
<a href="/" className="bRmzPi">Home</a>

// styled component with `activeProps` (EXPECTED)
<StyledLink href="/" activeProps={{className: 'active'}}>Home</StyledLink> 
<a href="/" className="bRmzPi active">Home</a>

// styled component with `activeProps` (Current behaviour)
<StyledLink href="/" activeProps={{className: 'active'}}>Home</StyledLink> 
<a href="/" className="active">Home</a> //Component without styling :(

https://github.com/styled-components/styled-components/blob/9d32631fc0eefae29d0c7112b71323b4c9ce0ef4/src/test/attrs.test.js#L57-L64

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant