styled-components: 3.1.6
https://codesandbox.io/s/jp17xk248w
Passing props works well with :after
, :before
Passing props doesn't work with :after
, :before
If you look in the DevTools you'll see that you're outputting invalid CSS:
You're missing a set of quotes around the test
.
- content: ${() => "test"};
+ content: ${() => '"test"'};
That single change makes it work: https://codesandbox.io/s/23mrnp9p30
Next time you have a usage question please either ask it on StackOverflow or in the community. Thanks.
Most helpful comment
If you look in the DevTools you'll see that you're outputting invalid CSS:
You're missing a set of quotes around the
test
.That single change makes it work: https://codesandbox.io/s/23mrnp9p30
Next time you have a usage question please either ask it on StackOverflow or in the community. Thanks.