Skip to content

Commit 01e7a5d

Browse files
Adds backgroundColor to inner views to avoid iPhone 6s Plus background problem
1 parent bfd016a commit 01e7a5d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

widgets/InlineTextInput.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,21 @@ export default class InlineTextInput extends Component {
5454
}
5555

5656
renderMessage() {
57-
const { message, messageStyle } = this.props
57+
const { message, messageStyle, style } = this.props
5858
if (this.shouldDisplayMessage()) {
5959
return(
60-
<Text style={[{
61-
color: 'red',
62-
marginLeft: 10,
63-
marginBottom: 10,
64-
fontSize: 12,
65-
}, messageStyle]}>
66-
{ message }
67-
</Text>
60+
<View style={{
61+
backgroundColor: (style && style.backgroundColor ? style.backgroundColor : 'white')
62+
}}>
63+
<Text style={[{
64+
color: 'red',
65+
marginLeft: 10,
66+
marginBottom: 10,
67+
fontSize: 12,
68+
}, messageStyle]}>
69+
{ message }
70+
</Text>
71+
</View>
6872
)
6973
}
7074
}
@@ -85,7 +89,8 @@ export default class InlineTextInput extends Component {
8589
flexDirection: 'row',
8690
alignItems: 'center',
8791
paddingTop: 6,
88-
paddingBottom: (this.shouldDisplayMessage() ? 0 : 6)
92+
paddingBottom: (this.shouldDisplayMessage() ? 0 : 6),
93+
backgroundColor: (style && style.backgroundColor ? style.backgroundColor : 'white'),
8994
}}>
9095
{ this.renderIcon() }
9196
<Text

0 commit comments

Comments
 (0)