File tree Expand file tree Collapse file tree 2 files changed +23
-17
lines changed Expand file tree Collapse file tree 2 files changed +23
-17
lines changed Original file line number Diff line number Diff line change 2
2
import React , { PureComponent } from 'react' ;
3
3
import { Text , View } from 'react-native' ;
4
4
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet' ;
5
+ import { SafeAreaView } from 'react-native-safe-area-context' ;
5
6
6
7
import { Icon } from '../common/Icons' ;
7
8
import { createStyleSheet } from '../styles' ;
@@ -36,10 +37,12 @@ export default class LightboxFooter extends PureComponent<Props> {
36
37
render ( ) {
37
38
const { displayMessage, onOptionsPress, style } = this . props ;
38
39
return (
39
- < View style = { [ styles . wrapper , style ] } >
40
- < Text style = { styles . text } > { displayMessage } </ Text >
41
- < Icon style = { styles . icon } color = "white" name = "more-vertical" onPress = { onOptionsPress } />
42
- </ View >
40
+ < SafeAreaView mode = "padding" edges = { [ 'right' , 'bottom' , 'left' ] } >
41
+ < View style = { [ styles . wrapper , style ] } >
42
+ < Text style = { styles . text } > { displayMessage } </ Text >
43
+ < Icon style = { styles . icon } color = "white" name = "more-vertical" onPress = { onOptionsPress } />
44
+ </ View >
45
+ </ SafeAreaView >
43
46
) ;
44
47
}
45
48
}
Original file line number Diff line number Diff line change 1
1
/* @flow strict-local */
2
2
import React , { PureComponent } from 'react' ;
3
3
import { View , Text } from 'react-native' ;
4
+ import { SafeAreaView } from 'react-native-safe-area-context' ;
4
5
5
6
import { shortTime , humanDate } from '../utils/date' ;
6
7
import { createStyleSheet } from '../styles' ;
@@ -63,20 +64,22 @@ export default class LightboxHeader extends PureComponent<Props> {
63
64
const subheader = `${ displayDate } at ${ time } ` ;
64
65
65
66
return (
66
- < View style = { styles . wrapper } >
67
- < UserAvatarWithPresence size = { 36 } avatarUrl = { avatarUrl } email = { senderEmail } />
68
- < View style = { styles . text } >
69
- < Text style = { styles . name } numberOfLines = { 1 } >
70
- { senderName }
71
- </ Text >
72
- < Text style = { styles . subheader } numberOfLines = { 1 } >
73
- { subheader }
74
- </ Text >
67
+ < SafeAreaView mode = "padding" edges = { [ 'top' , 'right' , 'left' ] } >
68
+ < View style = { styles . wrapper } >
69
+ < UserAvatarWithPresence size = { 36 } avatarUrl = { avatarUrl } email = { senderEmail } />
70
+ < View style = { styles . text } >
71
+ < Text style = { styles . name } numberOfLines = { 1 } >
72
+ { senderName }
73
+ </ Text >
74
+ < Text style = { styles . subheader } numberOfLines = { 1 } >
75
+ { subheader }
76
+ </ Text >
77
+ </ View >
78
+ < Touchable onPress = { onPressBack } >
79
+ < Icon style = { styles . rightIcon } color = "white" name = "x" />
80
+ </ Touchable >
75
81
</ View >
76
- < Touchable onPress = { onPressBack } >
77
- < Icon style = { styles . rightIcon } color = "white" name = "x" />
78
- </ Touchable >
79
- </ View >
82
+ </ SafeAreaView >
80
83
) ;
81
84
}
82
85
}
You can’t perform that action at this time.
0 commit comments