I am trying to use fontVariant
on a Text style. The documentation says it expects an "array of enum". How does that look like in json? I have tried passing a string, and it works on android is ignored on android, but throws an error on ios:
<Text style={{ fontVariant: 'small-caps' }}>some text</Text>
will throw:
JSON value 'small-caps' of type NSString cannot be converted to NSArray
I am on version 0.53.3 react-native
According to the source PropTypes, it expects an array of strings matching the enum:
<Text style={{ fontVariant: [ 'small-caps' ] }}>some text</Text>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With