From f85390fff4d1b7145f7de7019a860a06b00b6df7 Mon Sep 17 00:00:00 2001 From: Justin Stanley Date: Sat, 12 May 2018 12:20:39 -0500 Subject: [PATCH 1/2] Added allowFontScaling prop to TextInputProps --- types/react-native/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 756ef2b340..b0a0f89010 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -1088,6 +1088,14 @@ export type ReturnKeyTypeOptions = ReturnKeyType | ReturnKeyTypeAndroid | Return */ export interface TextInputProps extends ViewProps, TextInputIOSProps, TextInputAndroidProps, AccessibilityProps { + /** + * Specifies whether fonts should scale to respect Text Size accessibility settings. + * The default is true. + * + * https://facebook.github.io/react-native/docs/textinput.html#allowfontscaling + */ + allowFontScaling?: boolean; + /** * Can tell TextInput to automatically capitalize certain characters. * characters: all characters, From ec90482869920fd2482d34a94328ba23be3f5698 Mon Sep 17 00:00:00 2001 From: Justin Stanley Date: Sat, 12 May 2018 12:29:56 -0500 Subject: [PATCH 2/2] Moved allowFontScaling from TextPropsIOS to TextProps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `allowFontScaling` is not an iOS-only prop on Text. - also removed the link to `allowFontScaling` for TextInput as there’s already a link to the TextInput docs above the interface declaration. --- types/react-native/index.d.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index b0a0f89010..83266b6383 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -800,12 +800,6 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle { } export interface TextPropsIOS { - /** - * Specifies whether fonts should scale to respect Text Size accessibility setting on iOS. The - * default is `true`. - */ - allowFontScaling?: boolean; - /** * Specifies whether font should be scaled down automatically to fit given style constraints. */ @@ -843,6 +837,12 @@ export interface TextPropsAndroid { // https://facebook.github.io/react-native/docs/text.html#props export interface TextProps extends TextPropsIOS, TextPropsAndroid, AccessibilityProps { + /** + * Specifies whether fonts should scale to respect Text Size accessibility settings. + * The default is `true`. + */ + allowFontScaling?: boolean; + /** * This can be one of the following values: * @@ -1090,9 +1090,7 @@ export interface TextInputProps extends ViewProps, TextInputIOSProps, TextInputAndroidProps, AccessibilityProps { /** * Specifies whether fonts should scale to respect Text Size accessibility settings. - * The default is true. - * - * https://facebook.github.io/react-native/docs/textinput.html#allowfontscaling + * The default is `true`. */ allowFontScaling?: boolean;