FormidableLabs / redux-little-router

A tiny router for Redux that lets the URL do the talking.
MIT License
1.04k stars 114 forks source link

activeProps breaks merging of classNames on styled-components #213

Open medeeiros opened 7 years ago

medeeiros commented 7 years ago
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