Subclasses level and react native support #161
Replies: 1 comment 6 replies
-
Thank you! My initial reaction is that a separate package makes more sense here but I’ll have a think about it and get back to you 🙏🏼 |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
Recently with @QwisTy, we wanted to use CVA for a React Native project, but we came across a use-case that caused us to use an internal utility with an API similar to CVA.
On React Native, the style only applies to the styled element, there is no notion of inheritance from parents (for the colour of a text for example).
👉 So what could be written like this on the web :
😫 must be written like this on react native :
💆 This is the API we have implemented internally and which I suggest to implement:
In our case we are using tailwind via twnrc on react native which allows us to use strings as output.
✨ But, in order to improve the React Native support, I also suggest to add an option to handle objects :
Of course, both options can be enabled at the same time and apply to variant compounds.
If you're okay with this I can make a PR to support this case.
Beta Was this translation helpful? Give feedback.
All reactions