jameslnewell / styled-components-breakpoint

Utility function for using breakpoints with styled-components 💅.
243 stars 17 forks source link

Using multiple variables breaks rendering #11

Closed Spaideri closed 6 years ago

Spaideri commented 6 years ago

When breakpoint string contains two variables like this:

${breakpoint('tablet') background: ${'grey'}; color: ${'white'}; } the string pattern start and end chars are missing because I don't know how to escape them in this editor 😃

rendering breaks and results in combined value: background: greywhite;

albacoretuna commented 6 years ago

Add these "```" (without the quotation marks) before and after your code.

${breakpoint('tablet')`
background: ${'grey'};
color: ${'white'};
`}
jameslnewell commented 6 years ago

🤦‍♂️ doh!

Thanks! Fixed and released in 2.0.2. Test added.

albacoretuna commented 6 years ago

That was quick. Thanks a 💯