Skip to content

Commit

Permalink
Fixed ActionSheetCustom’s bottom inset for iPhone X layout
Browse files Browse the repository at this point in the history
Closes #5
  • Loading branch information
Alessio Cancian committed Mar 16, 2021
1 parent e6233d1 commit 2d215fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/ActionSheetCustom.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Text, View, Dimensions, Modal, TouchableHighlight, Animated, ScrollView, Easing } from 'react-native'
import { Text, View, Dimensions, Modal, TouchableHighlight, Animated, ScrollView, Easing, SafeAreaView } from 'react-native'
import * as utils from './utils'
import styles2 from './styles'

Expand Down Expand Up @@ -153,7 +153,7 @@ class ActionSheet extends React.Component {
transparent
onRequestClose={this._cancel}
>
<View style={[styles.wrapper]}>
<SafeAreaView style={[styles.wrapper]}>
<Text
style={[styles.overlay]}
onPress={this._cancel}
Expand All @@ -169,7 +169,7 @@ class ActionSheet extends React.Component {
<ScrollView scrollEnabled={scrollEnabled}>{this._renderOptions()}</ScrollView>
{this._renderCancelButton()}
</Animated.View>
</View>
</SafeAreaView>
</Modal>
)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
bottom: 50,
left: 0,
opacity: 0.4,
backgroundColor: '#000'
Expand Down

0 comments on commit 2d215fb

Please sign in to comment.