How to use a className prop #179
Unanswered
rochajulian
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@rochajulian Your code is fine, so it must be an issue with your configuration of Tailwind or React Native. I personally haven't used Tailwind + React Native, so I'm not a huge help there. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I am on React Native (Expo) and want to be able to pass extra classes to this component such as "mt-40" when I want. I am looking to use the className prop that Tailwind Variants docs (https://www.tailwind-variants.org/docs/overriding-styles) describes but this does not work as a prop for some reason. It only works when I declare the value right then and there as so:
As you can see though, in this second case the className prop is not being used. How can I get it to use it?
You might wonder what happens when I try to use it as a prop. Well, unfortunately, nothing happens to the styling :(
Beta Was this translation helpful? Give feedback.
All reactions