[v3] explicitly need to use styles
for a variant to be detected
#456
Labels
enhancement
New feature or request
Milestone
Description
Hey,
Not sure if it's a bug report per se or an improvement.
When using variants, the babel plugin will explicitly looks for a
styles
object to get the styles from (https://github.com/jpudysz/react-native-unistyles/blob/main/plugin/variants.js#L6)I personally like to name my styles object
s
to keep it short, which means the following is not detected.Should we be able to defined a custom name through the
babel.config.js
or there is a smarter way to detect a style object with any custom name?Steps to Reproduce
s
useVariants
Snack or Repository Link (Optional)
No response
Unistyles Version
3.0.0-beta.4
React Native Version
0.76.5
Platforms
iOS
Expo
Yes
The text was updated successfully, but these errors were encountered: