|
1 | 1 | import React, { Component } from 'react'; |
2 | 2 | import { |
3 | 3 | StyleSheet, |
| 4 | + SafeAreaView, |
4 | 5 | View, |
5 | 6 | Text, |
6 | 7 | TouchableHighlight, |
@@ -30,6 +31,7 @@ export default class DropdownAlert extends Component { |
30 | 31 | startDelta: PropTypes.number, |
31 | 32 | endDelta: PropTypes.number, |
32 | 33 | containerStyle: ViewPropTypes.style, |
| 34 | + safeAreaStyle:ViewPropTypes.style, |
33 | 35 | titleStyle: Text.propTypes.style, |
34 | 36 | messageStyle: Text.propTypes.style, |
35 | 37 | imageStyle: Image.propTypes.style, |
@@ -76,6 +78,10 @@ export default class DropdownAlert extends Component { |
76 | 78 | padding: 16, |
77 | 79 | flexDirection: 'row', |
78 | 80 | }, |
| 81 | + safeAreaStyle:{ |
| 82 | + flexDirection:'row', |
| 83 | + flex:1 |
| 84 | + }, |
79 | 85 | titleStyle: { |
80 | 86 | fontSize: 16, |
81 | 87 | textAlign: 'left', |
@@ -428,11 +434,13 @@ export default class DropdownAlert extends Component { |
428 | 434 | onLayout={event => this.onLayoutEvent(event)} |
429 | 435 | > |
430 | 436 | <View style={style}> |
431 | | - <ImageView style={StyleSheet.flatten(this.props.imageStyle)} source={source} /> |
432 | | - <View style={StyleSheet.flatten(this.props.defaultTextContainer)}> |
433 | | - <Label style={StyleSheet.flatten(this.props.titleStyle)} numberOfLines={this.props.titleNumOfLines} text={this.state.title} /> |
434 | | - <Label style={StyleSheet.flatten(this.props.messageStyle)} numberOfLines={this.props.messageNumOfLines} text={this.state.message} /> |
435 | | - </View> |
| 437 | + <SafeAreaView style={StyleSheet.flatten(this.props.safeAreaStyle)}> |
| 438 | + <ImageView style={StyleSheet.flatten(this.props.imageStyle)} source={source} /> |
| 439 | + <View style={StyleSheet.flatten(this.props.defaultTextContainer)}> |
| 440 | + <Label style={StyleSheet.flatten(this.props.titleStyle)} numberOfLines={this.props.titleNumOfLines} text={this.state.title} /> |
| 441 | + <Label style={StyleSheet.flatten(this.props.messageStyle)} numberOfLines={this.props.messageNumOfLines} text={this.state.message} /> |
| 442 | + </View> |
| 443 | + </SafeAreaView> |
436 | 444 | {showCancel && |
437 | 445 | <TouchableOpacity |
438 | 446 | style={{ |
|
0 commit comments