mattermost-mobile/app/components/safe_area_view/safe_area_view.android.js
enahum a708a1755b
Right drawer (#1275)
* Add right sidebar

* initial implementation of the right drawer

* Do not hide status bar on drawer open

* initial options in the RHD

* Fix android layout

* feedback review
2017-12-22 15:50:02 -03:00

34 lines
904 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
}
});