From 0ef0eff870275dee6be46534a39347ece1353a95 Mon Sep 17 00:00:00 2001 From: OSBotify <76178356+OSBotify@users.noreply.github.com> Date: Wed, 12 Jan 2022 11:45:16 -0800 Subject: [PATCH 1/2] Merge pull request #7175 from Expensify/version-BUILD-3910a6c8b6fe2973c548ad7f1b90e891a7345dc8 (cherry picked from commit fdc79b56adb4f294d87f4f637dc0cf56fc2853c8) --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 3aa1ac390c07..37610414d7f5 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -149,8 +149,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001012901 - versionName "1.1.29-1" + versionCode 1001012902 + versionName "1.1.29-2" } splits { abi { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index f0374d29c514..bb0924d1540c 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -31,7 +31,7 @@ CFBundleVersion - 1.1.29.1 + 1.1.29.2 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index cb2bafb4810f..4f0904f733b1 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.1.29.1 + 1.1.29.2 diff --git a/package-lock.json b/package-lock.json index 5952e7188d08..1007b98728d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.1.29-1", + "version": "1.1.29-2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e3438a431573..bfd0608146e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.1.29-1", + "version": "1.1.29-2", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 5d66867de64e5d63b68d9454388b8ebd4712f572 Mon Sep 17 00:00:00 2001 From: Rory Abraham <47436092+roryabraham@users.noreply.github.com> Date: Wed, 12 Jan 2022 11:42:03 -0800 Subject: [PATCH 2/2] Merge pull request #7149 from Expensify/Rory-TextInputStories (cherry picked from commit 3910a6c8b6fe2973c548ad7f1b90e891a7345dc8) --- .../TextInput/baseTextInputPropTypes.js | 1 + src/stories/TextInput.stories.js | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 src/stories/TextInput.stories.js diff --git a/src/components/TextInput/baseTextInputPropTypes.js b/src/components/TextInput/baseTextInputPropTypes.js index 73990fd0e0d8..e37163e923ec 100644 --- a/src/components/TextInput/baseTextInputPropTypes.js +++ b/src/components/TextInput/baseTextInputPropTypes.js @@ -28,6 +28,7 @@ const propTypes = { /** input style */ inputStyle: PropTypes.arrayOf(PropTypes.object), + /** If present, this prop forces the label to remain in a position where it will not collide with input text */ forceActiveLabel: PropTypes.bool, /** Should the input auto focus? */ diff --git a/src/stories/TextInput.stories.js b/src/stories/TextInput.stories.js new file mode 100644 index 000000000000..88c216148b84 --- /dev/null +++ b/src/stories/TextInput.stories.js @@ -0,0 +1,68 @@ +import React from 'react'; +import TextInput from '../components/TextInput'; + +/** + * We use the Component Story Format for writing stories. Follow the docs here: + * + * https://storybook.js.org/docs/react/writing-stories/introduction#component-story-format + */ +const story = { + title: 'Components/TextInput', + component: TextInput, +}; + +// eslint-disable-next-line react/jsx-props-no-spreading +const Template = args => ; + +// Arguments can be passed to the component by binding +// See: https://storybook.js.org/docs/react/writing-stories/introduction#using-args + +const AutoFocus = Template.bind({}); +AutoFocus.args = { + label: 'Auto-focused text input', + name: 'AutoFocus', + autoFocus: true, +}; + +const Default = Template.bind({}); +Default.args = { + label: 'Default text input', + name: 'Default', +}; + +const DefaultValue = Template.bind({}); +DefaultValue.args = { + label: 'Input with default value', + name: 'DefaultValue', + defaultValue: 'My default value', +}; + +const ErrorStory = Template.bind({}); +ErrorStory.args = { + label: 'Input with error', + name: 'InputWithError', + errorText: 'This field has an error.', +}; + +const ForceActiveLabel = Template.bind({}); +ForceActiveLabel.args = { + label: 'Forced active label', + forceActiveLabel: true, +}; + +const Placeholder = Template.bind({}); +Placeholder.args = { + label: 'Input with placeholder', + name: 'Placeholder', + placeholder: 'My placeholder text', +}; + +export default story; +export { + AutoFocus, + Default, + DefaultValue, + ErrorStory, + ForceActiveLabel, + Placeholder, +};