From c59da6eae88690c5cd0071d88f933b0e88e9c97b Mon Sep 17 00:00:00 2001 From: Shen Jin Date: Mon, 20 May 2019 07:47:37 -0700 Subject: [PATCH] Add textContentType to onboarding flow Summary: Allows iOS users to prefil from keyboard if they support safari autofill Differential Revision: D15385599 fbshipit-source-id: 35d8a7a04c44d23d2aa27dffa02035b68818db7a --- Libraries/Components/TextInput/TextInput.js | 61 +++++++++++---------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 44999222bf741e..61441eb5af2dee 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -178,6 +178,36 @@ export type ReturnKeyType = export type AutoCapitalize = 'none' | 'sentences' | 'words' | 'characters'; +export type TextContentType = + | 'none' + | 'URL' + | 'addressCity' + | 'addressCityAndState' + | 'addressState' + | 'countryName' + | 'creditCardNumber' + | 'emailAddress' + | 'familyName' + | 'fullStreetAddress' + | 'givenName' + | 'jobTitle' + | 'location' + | 'middleName' + | 'name' + | 'namePrefix' + | 'nameSuffix' + | 'nickname' + | 'organizationName' + | 'postalCode' + | 'streetAddressLine1' + | 'streetAddressLine2' + | 'sublocality' + | 'telephoneNumber' + | 'username' + | 'password' + | 'newPassword' + | 'oneTimeCode'; + type IOSProps = $ReadOnly<{| spellCheck?: ?boolean, keyboardAppearance?: ?('default' | 'light' | 'dark'), @@ -189,36 +219,7 @@ type IOSProps = $ReadOnly<{| | ?DataDetectorTypesType | $ReadOnlyArray, inputAccessoryViewID?: ?string, - textContentType?: ?( - | 'none' - | 'URL' - | 'addressCity' - | 'addressCityAndState' - | 'addressState' - | 'countryName' - | 'creditCardNumber' - | 'emailAddress' - | 'familyName' - | 'fullStreetAddress' - | 'givenName' - | 'jobTitle' - | 'location' - | 'middleName' - | 'name' - | 'namePrefix' - | 'nameSuffix' - | 'nickname' - | 'organizationName' - | 'postalCode' - | 'streetAddressLine1' - | 'streetAddressLine2' - | 'sublocality' - | 'telephoneNumber' - | 'username' - | 'password' - | 'newPassword' - | 'oneTimeCode' - ), + textContentType?: ?TextContentType, scrollEnabled?: ?boolean, |}>;