From c00e3f2befd3fdc4d9bdbe4d3aa6a7fd21bde6b7 Mon Sep 17 00:00:00 2001
From: mashazyu <mariya.z@gmail.com>
Date: Sun, 13 Dec 2020 17:03:49 +0100
Subject: [PATCH] Adds padding between keyboard and text input

---
 components/common/app-text-input.js       | 11 +++++++++--
 components/cycle-day/symptom-edit-view.js |  5 +++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/components/common/app-text-input.js b/components/common/app-text-input.js
index 84392665..d0cbdbf0 100644
--- a/components/common/app-text-input.js
+++ b/components/common/app-text-input.js
@@ -1,11 +1,18 @@
 import React from 'react'
-import { StyleSheet, TextInput } from 'react-native'
+import { KeyboardAvoidingView, StyleSheet, TextInput } from 'react-native'
 import PropTypes from 'prop-types'
 
 import { Colors, Spacing, Typography } from '../../styles'
 
 const AppTextInput = ({ style, ...props }) => {
-  return <TextInput style={[styles.input, style]} {...props} />
+  return (
+    <KeyboardAvoidingView
+      behavior="padding"
+      keyboardVerticalOffset={250}
+    >
+      <TextInput style={[styles.input, style]} {...props} />
+    </KeyboardAvoidingView>
+  )
 }
 
 AppTextInput.propTypes = {
diff --git a/components/cycle-day/symptom-edit-view.js b/components/cycle-day/symptom-edit-view.js
index 500c07e2..b6e4195d 100644
--- a/components/cycle-day/symptom-edit-view.js
+++ b/components/cycle-day/symptom-edit-view.js
@@ -215,10 +215,11 @@ class SymptomEditView extends Component {
               <AppText>{symtomPage[symptom].note}</AppText>
               <AppTextInput
                 multiline={true}
-                placeholder={sharedLabels.enter}
+                numberOfLines={3}
                 onChangeText={this.onEditNote}
-                value={noteText !== null ? noteText : ''}
+                placeholder={sharedLabels.enter}
                 testID='noteInput'
+                value={noteText !== null ? noteText : ''}
               />
             </Segment>
           }
-- 
GitLab