@@ -41,11 +41,12 @@ type GetModalStylesStyleUtil = {
4141 popoverAnchorPosition ?: ViewStyle ,
4242 innerContainerStyle ?: ViewStyle ,
4343 outerStyle ?: ViewStyle ,
44+ shouldUseModalPaddingStyle ?: boolean ,
4445 ) => GetModalStyles ;
4546} ;
4647
4748const createModalStyleUtils : StyleUtilGenerator < GetModalStylesStyleUtil > = ( { theme, styles} ) => ( {
48- getModalStyles : ( type , windowDimensions , popoverAnchorPosition = { } , innerContainerStyle = { } , outerStyle = { } ) : GetModalStyles => {
49+ getModalStyles : ( type , windowDimensions , popoverAnchorPosition = { } , innerContainerStyle = { } , outerStyle = { } , shouldUseModalPaddingStyle = true ) : GetModalStyles => {
4950 const { windowWidth, isSmallScreenWidth} = windowDimensions ;
5051
5152 let modalStyle : GetModalStyles [ 'modalStyle' ] = {
@@ -212,13 +213,16 @@ const createModalStyleUtils: StyleUtilGenerator<GetModalStylesStyleUtil> = ({the
212213 width : '100%' ,
213214 borderTopLeftRadius : variables . componentBorderRadiusLarge ,
214215 borderTopRightRadius : variables . componentBorderRadiusLarge ,
215- paddingTop : variables . componentBorderRadiusLarge ,
216- paddingBottom : variables . componentBorderRadiusLarge ,
217216 justifyContent : 'center' ,
218217 overflow : 'hidden' ,
219218 boxShadow : theme . shadow ,
220219 } ;
221220
221+ if ( shouldUseModalPaddingStyle ) {
222+ modalContainerStyle . paddingTop = variables . componentBorderRadiusLarge ;
223+ modalContainerStyle . paddingBottom = variables . componentBorderRadiusLarge ;
224+ }
225+
222226 shouldAddBottomSafeAreaPadding = true ;
223227 swipeDirection = undefined ;
224228 animationIn = 'slideInUp' ;
0 commit comments