1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Mobile: Fixes #8027: Fixed link modal position on devices with notch (#8029)

This commit is contained in:
Letty
2023-07-06 20:03:57 +02:00
committed by GitHub
parent e278a26dc8
commit e21a5c1b80
7 changed files with 76 additions and 26 deletions

View File

@ -3,8 +3,9 @@
const React = require('react');
const { useState, useEffect, useMemo, useRef } = require('react');
const { StyleSheet } = require('react-native');
const { View, Modal, Text, TextInput, Button } = require('react-native');
const { View, Text, TextInput, Button } = require('react-native');
import Modal from '../Modal';
import { themeStyle } from '@joplin/lib/theme';
import { _ } from '@joplin/lib/locale';
import { EditorControl } from './types';
@ -43,7 +44,6 @@ const EditLinkDialog = (props: LinkDialogProps) => {
margin: 15,
padding: 30,
backgroundColor: theme.backgroundColor,
elevation: 5,
shadowOffset: {
width: 1,
@ -132,23 +132,22 @@ const EditLinkDialog = (props: LinkDialogProps) => {
return (
<Modal
animationType="slide"
containerStyle={styles.modalContent}
transparent={true}
visible={props.visible}
onRequestClose={() => {
props.editorControl.hideLinkDialog();
}}>
<View style={styles.modalContent}>
<Text style={styles.header}>{_('Edit link')}</Text>
<View>
{linkTextInput}
{linkURLInput}
</View>
<Button
style={styles.button}
onPress={onSubmit}
title={_('Done')}
/>
<Text style={styles.header}>{_('Edit link')}</Text>
<View>
{linkTextInput}
{linkURLInput}
</View>
<Button
style={styles.button}
onPress={onSubmit}
title={_('Done')}
/>
</Modal>
);
};