diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 99998e9241..df8c1e7695 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -757,7 +757,9 @@ export interface LayoutChangeEvent { }; } +export type FontVariant = 'small-caps' | 'oldstyle-nums' | 'lining-nums' | 'tabular-nums' | 'proportional-nums'; export interface TextStyleIOS extends ViewStyle { + fontVariant?: FontVariant[]; letterSpacing?: number; textDecorationColor?: string; textDecorationStyle?: "solid" | "double" | "dotted" | "dashed"; diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 7de9b96374..d6f55c3f4d 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -178,10 +178,14 @@ const textStyle: StyleProp = { const imageStyle: StyleProp = { resizeMode: "contain", }; +const fontVariantStyle: StyleProp = { + fontVariant: ['tabular-nums'] +} const viewProperty = StyleSheet.flatten(viewStyle).backgroundColor; const textProperty = StyleSheet.flatten(textStyle).fontSize; const imageProperty = StyleSheet.flatten(imageStyle).resizeMode; +const fontVariantProperty = StyleSheet.flatten(fontVariantStyle).fontVariant; const s = StyleSheet.create({ shouldWork: {