mattermost-mobile/app/components/loading.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

51 lines
1.1 KiB
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 {
ActivityIndicator,
StyleSheet,
View,
ViewPropTypes,
} from 'react-native';
export default class Loading extends PureComponent {
static propTypes = {
size: PropTypes.string,
color: PropTypes.string,
style: ViewPropTypes.style,
};
static defaultProps = {
size: 'large',
color: 'grey',
style: {},
};
render() {
return (
<View style={styles.container}>
<ActivityIndicator
style={[styles.loading, this.props.style]}
animating={true}
size={this.props.size}
color={this.props.color}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
loading: {
marginLeft: 3,
},
});