mattermost-mobile/app/components/safe_area_view/safe_area_view.android.js
Jesse Hallam 58b72302d6 update eslint's comma-dangle rule to always-multiline (#1457)
* 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.
2018-02-23 09:06:02 -05:00

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,
},
});