Replies: 1 comment 1 reply
-
You're working within styled-components so the directives can't be used. Instead, we make variables and pass them onto components: const stylesRed = tw`bg-red text-white`
const MainContent = styled.div`
${tw`mb-4`}
${stylesRed}
` |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it not possible to use the Tailwind
@screen
directive within a tw styled component? I have nesting turned on in my postcss.config file but doesnt seem to work.PostCSS config
postcss.config.js
Beta Was this translation helpful? Give feedback.
All reactions