Hey there!
I’m creating my own snippet library, and can’t solve this:
Adjusting a CSS property based on received props in styled-components looks like this:
background: ${props => props.primary ? 'palevioletred' : 'white'};
Since I type that interpolation a lot, I wanted to make a snippet out of it, however, my snippet code’s not working.
<snippet>
<content><![CDATA[
${(props) => props.${1}};
]]></content>
<tabTrigger>sci</tabTrigger>
<scope>source.js</scope>
<description>styled-components interpolation</description>
</snippet>
I have tried to escape the dollar sign (the first character on the line) in a few ways, but no success.
Is it even possible? How?