* 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.
27 lines
770 B
JavaScript
27 lines
770 B
JavaScript
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import React, {PureComponent} from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import {
|
|
Platform,
|
|
StatusBar as NativeStatusBar,
|
|
} from 'react-native';
|
|
import tinyColor from 'tinycolor2';
|
|
|
|
export default class StatusBar extends PureComponent {
|
|
static propTypes = {
|
|
theme: PropTypes.object.isRequired,
|
|
};
|
|
|
|
render() {
|
|
const {theme} = this.props;
|
|
const headerColor = tinyColor(theme.sidebarHeaderBg);
|
|
let barStyle = 'light-content';
|
|
if (headerColor.isLight() && Platform.OS === 'ios') {
|
|
barStyle = 'dark-content';
|
|
}
|
|
|
|
return <NativeStatusBar barStyle={barStyle}/>;
|
|
}
|
|
}
|