From 7d531d6686b487ceac39021203651474ba53604d Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 21 Jun 2021 15:13:18 -0300 Subject: [PATCH 1/2] wraps iOS modals in SafeAreaView --- src/components/Modal/index.ios.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/Modal/index.ios.js b/src/components/Modal/index.ios.js index 72c4c63243da..475c84f64ee1 100644 --- a/src/components/Modal/index.ios.js +++ b/src/components/Modal/index.ios.js @@ -1,15 +1,21 @@ import React from 'react'; +import {SafeAreaView} from 'react-native'; import withWindowDimensions from '../withWindowDimensions'; import BaseModal from './BaseModal'; import {propTypes, defaultProps} from './ModalPropTypes'; +// Only wan to use on iOS. Avoids ScrollBar in the middle of the modal. +// https://github.com/facebook/react-native/issues/26610 const Modal = props => ( - - {props.children} - + + + {props.children} + + + ); Modal.propTypes = propTypes; From 1b71b7093c6264242f2b3485c0c79d1c082fe0d3 Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 21 Jun 2021 18:19:27 -0300 Subject: [PATCH 2/2] fix small typo --- src/components/Modal/index.ios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Modal/index.ios.js b/src/components/Modal/index.ios.js index 475c84f64ee1..43087549409a 100644 --- a/src/components/Modal/index.ios.js +++ b/src/components/Modal/index.ios.js @@ -4,7 +4,7 @@ import withWindowDimensions from '../withWindowDimensions'; import BaseModal from './BaseModal'; import {propTypes, defaultProps} from './ModalPropTypes'; -// Only wan to use on iOS. Avoids ScrollBar in the middle of the modal. +// Only want to use on iOS. Avoids ScrollBar in the middle of the modal. // https://github.com/facebook/react-native/issues/26610 const Modal = props => (