Fix keyboard double pad issue in email change & verify modals (#1664)

zio/stable
Paul Frazee 2023-10-10 14:02:31 -07:00 committed by GitHub
parent fc28fc639f
commit e878da04a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 259 additions and 284 deletions

View File

@ -1,11 +1,5 @@
import React, {useState} from 'react'
import {
ActivityIndicator,
KeyboardAvoidingView,
SafeAreaView,
StyleSheet,
View,
} from 'react-native'
import {ActivityIndicator, SafeAreaView, StyleSheet, View} from 'react-native'
import {ScrollView, TextInput} from './util'
import {observer} from 'mobx-react-lite'
import {Text} from '../util/text/Text'
@ -101,10 +95,7 @@ export const Component = observer(function Component({}: {}) {
}
return (
<KeyboardAvoidingView
behavior="padding"
style={[pal.view, styles.container]}>
<SafeAreaView style={s.flex1}>
<SafeAreaView style={[pal.view, s.flex1]}>
<ScrollView
testID="changeEmailModal"
style={[s.flex1, isMobile && {paddingHorizontal: 18}]}>
@ -228,15 +219,10 @@ export const Component = observer(function Component({}: {}) {
</View>
</ScrollView>
</SafeAreaView>
</KeyboardAvoidingView>
)
})
const styles = StyleSheet.create({
container: {
flex: 1,
paddingBottom: isWeb ? 0 : 40,
},
titleSection: {
paddingTop: isWeb ? 0 : 4,
paddingBottom: isWeb ? 14 : 10,

View File

@ -1,7 +1,6 @@
import React, {useState} from 'react'
import {
ActivityIndicator,
KeyboardAvoidingView,
Pressable,
SafeAreaView,
StyleSheet,
@ -82,10 +81,7 @@ export const Component = observer(function Component({
}
return (
<KeyboardAvoidingView
behavior="padding"
style={[pal.view, styles.container]}>
<SafeAreaView style={s.flex1}>
<SafeAreaView style={[pal.view, s.flex1]}>
<ScrollView
testID="verifyEmailModal"
style={[s.flex1, isMobile && {paddingHorizontal: 18}]}>
@ -128,9 +124,7 @@ export const Component = observer(function Component({
color={pal.colors.text}
size={16}
/>
<Text
type="xl-medium"
style={[pal.text, s.flex1, {minWidth: 0}]}>
<Text type="xl-medium" style={[pal.text, s.flex1, {minWidth: 0}]}>
{store.session.currentSession?.email || ''}
</Text>
</View>
@ -244,7 +238,6 @@ export const Component = observer(function Component({
</View>
</ScrollView>
</SafeAreaView>
</KeyboardAvoidingView>
)
})
@ -274,10 +267,6 @@ function ReminderIllustration() {
}
const styles = StyleSheet.create({
container: {
flex: 1,
paddingBottom: isWeb ? 0 : 40,
},
titleSection: {
paddingTop: isWeb ? 0 : 4,
paddingBottom: isWeb ? 14 : 10,