-
Notifications
You must be signed in to change notification settings - Fork 17
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
[v3] Missing spread for interpolations #26
Comments
It seems a similar bug, and similar fix (missing spread operator) happened before |
@patibugaj Not a great solution, but as a temporary workaround until the bug is fixed, you can define multiple ${breakpoint('md')`
&:hover {
color: ${({ theme }) => theme.colors.green};
}
`};
${breakpoint('md')`
&:hover {
background-color: ${({ theme }) => theme.colors.darkGrey_2};
}
`}; |
Confirming this is still a bug. I have switched to this approach: https://jsramblings.com/how-to-use-media-queries-with-styled-components/ |
I've noticed that template literal doesn't work properly with the
breakpoint
method.My source code, that leads me to the problem:
As a result, the dynamic values are concatenated into one string.
Dev tools result:
Probably the issue is caused by missing spread operator on
interpolations
here:styled-components-breakpoint/src/breakpoint.ts
Line 30 in 2204a87
The text was updated successfully, but these errors were encountered: