-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix type error with modifier
#367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid to me!
Why are you trying to put a tagged template literal into the |
Because that's what the README suggests for this use case.
const Button = styled.button`
color: red;
`
const ButtonList = styled.div`
display: flex;
${Button} {
flex: 1 0 auto;
}
`
import { css } from 'styled-components';
test('nested buttons are flexed', () => {
const tree = renderer.create(<ButtonList><Button /></ButtonList>).toJSON()
expect(tree).toHaveStyleRule('flex', '1 0 auto', {
modifier: css`${Button}`,
})
}) |
@timhwang21 ok cool, could you merge from |
Will do -- looks like |
Closes #268.