diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 413053ee10..2316ee63c9 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -17,6 +17,7 @@ // Ryan Nickel // Souvik Ghosh // Cheng Gibson +// Saransh Kataria // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -903,6 +904,14 @@ export interface TextProps extends TextPropsIOS, TextPropsAndroid, Accessibility * Used to reference react managed views from native code. */ nativeID?: string; + + /** + * Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values: + * - null/undefined (default): inherit from the parent node or the global default (0) + * - 0: no max, ignore parent/global default + * - >= 1: sets the maxFontSizeMultiplier of this node to this value + */ + maxFontSizeMultiplier?: number | null; } /** @@ -1427,6 +1436,14 @@ export interface TextInputProps extends ViewProps, TextInputIOSProps, TextInputA * or set/update maxLength to prevent unwanted edits without flicker. */ value?: string; + + /** + * Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values: + * - null/undefined (default): inherit from the parent node or the global default (0) + * - 0: no max, ignore parent/global default + * - >= 1: sets the maxFontSizeMultiplier of this node to this value + */ + maxFontSizeMultiplier?: number | null; } /** diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 622e2b28c8..74f8b6a9b5 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -834,6 +834,8 @@ const NativeIDTest = () => ( ); +const MaxFontSizeMultiplierTest = () => Text; + const ShareTest = () => { Share.share( { title: "title", message: "message" },