From 659eb8da312e7f7f822df6def5c339f076a24272 Mon Sep 17 00:00:00 2001 From: Maria Zadnepryanets Date: Sat, 23 Jan 2021 11:53:34 +0000 Subject: [PATCH] Fix/bottom padding after input field --- components/common/app-text-input.js | 16 ++++++++++++---- components/password-prompt.js | 1 + .../settings/password/enter-new-password.js | 2 ++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/components/common/app-text-input.js b/components/common/app-text-input.js index 3ec9369..3a50ed2 100644 --- a/components/common/app-text-input.js +++ b/components/common/app-text-input.js @@ -4,11 +4,14 @@ import PropTypes from 'prop-types' import { Colors, Spacing, Typography } from '../../styles' -const AppTextInput = ({ style, ...props }) => { +const AppTextInput = ({ style, isKeyboardOffset, ...props }) => { + const behavior = isKeyboardOffset ? "padding" : "height" + const keyboardVerticalOffset = isKeyboardOffset ? 300 : 0 + return ( @@ -16,7 +19,12 @@ const AppTextInput = ({ style, ...props }) => { } AppTextInput.propTypes = { - style: PropTypes.object + style: PropTypes.object, + isKeyboardOffset: PropTypes.bool, +} + +AppTextInput.defultProps = { + isKeyboardOffset: true, } const styles = StyleSheet.create({ diff --git a/components/password-prompt.js b/components/password-prompt.js index 2924b46..4190312 100644 --- a/components/password-prompt.js +++ b/components/password-prompt.js @@ -89,6 +89,7 @@ export default class PasswordPrompt extends Component {