* update eslint's `comma-dangle` rule to `always-multiline` * add check and fix scripts to package.json * Invoke `yarn fix` to adopt the updated eslint rules. No other changes are included.
34 lines
907 B
JavaScript
34 lines
907 B
JavaScript
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import React, {PureComponent} from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import {StyleSheet, View} from 'react-native';
|
|
|
|
export default class SafeAreaAndroid extends PureComponent {
|
|
static propTypes = {
|
|
backgroundColor: PropTypes.string,
|
|
children: PropTypes.node.isRequired,
|
|
theme: PropTypes.object.isRequired,
|
|
};
|
|
|
|
render() {
|
|
const {backgroundColor, children, theme} = this.props;
|
|
let bgColor = theme.centerChannelBg;
|
|
if (backgroundColor) {
|
|
bgColor = backgroundColor;
|
|
}
|
|
|
|
return (
|
|
<View style={[style.container, {backgroundColor: bgColor}]}>
|
|
{children}
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
const style = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
},
|
|
});
|