Prevent keyboard from blocking alt image modal (#531)

* Prevent keyboard from blocking alt image modal

* Tune padding of altimage modal on desktop web

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
zio/stable
Ollie Hsieh 2023-04-25 11:34:06 -07:00 committed by GitHub
parent 3ef7504f91
commit b00365c196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import LinearGradient from 'react-native-linear-gradient'
import {useStores} from 'state/index'
import {isDesktopWeb} from 'platform/detection'
export const snapPoints = [330]
export const snapPoints = ['80%']
interface Props {
onAltTextSet: (altText?: string | undefined) => void
@ -34,7 +34,9 @@ export function Component({onAltTextSet}: Props) {
}
return (
<View testID="altTextImageModal" style={[pal.view, styles.container]}>
<View
testID="altTextImageModal"
style={[pal.view, styles.container, s.flex1]}>
<Text style={[styles.title, pal.text]}>Add alt text</Text>
<TextInput
testID="altTextImageInput"
@ -73,9 +75,9 @@ export function Component({onAltTextSet}: Props) {
const styles = StyleSheet.create({
container: {
gap: 18,
bottom: 0,
paddingVertical: 18,
paddingVertical: isDesktopWeb ? 0 : 18,
paddingHorizontal: isDesktopWeb ? 0 : 12,
height: '100%',
width: '100%',
},
title: {