Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the issue
"fontVariant" style array value is deprecated. Use space-separated values.
Style definition of font looks like this:
export const mySansSerif:TextStyle = {
fontFamily: "Neutraface Two Text Demi",
fontVariant: ['lining-nums'],
textTransform: "uppercase",
}
If I remove the array brackets, I get this error in VSCode:
Type 'string' is not assignable to type 'FontVariant[]'.ts(2322)
StyleSheetTypes.d.ts(317, 3): The expected type comes from property 'fontVariant' which is declared here on type 'TextStyle'
(property) TextStyleIOS.fontVariant?: FontVariant[] | undefined
Expected behavior
I should be able to use fontVariant
in some way without deprecation warnings or errors
Steps to reproduce
Use above font style definition
Test case
Additional comments
I also have a similar issue with shadow*
props that I haven't been able to figure out either:
"shadow*" style props are deprecated. Use "boxShadow".
The style causing the error:
export const textWithShadow:TextStyle = {
textShadowColor: 'rgba(0, 0, 0, 0.75)',
textShadowOffset: {width: 2, height: 2},
textShadowRadius: 8,
}