bradlc / babel-plugin-tailwind-components

Use Tailwind with any CSS-in-JS library
MIT License
332 stars 25 forks source link

Is group-hover supported in styled components? #25

Closed shawnmmatthews closed 5 years ago

shawnmmatthews commented 5 years ago

I have added group-hover under the visibility module array in tailwind.js. I have then added it in my styled component as

 const Hover = styled.div’
  ${tw ‘invisible group-hover:visible’};
‘

It however doesn’t seem to be applying. All other tailwind styling is working as expected. Is there any thing I need to specifically do to get group-hover working?

bradlc commented 5 years ago

Hey @shawnmmatthews

group-hover is supported in the tailwind.macro alpha, which you can try if you’re using Tailwind v1: npm install tailwind.macro@next

import tw from 'tailwind.macro';

const Hover = tw.div’invisible group-hover:visible’;
shawnmmatthews commented 5 years ago

Thanks!