mattermost-mobile/app/components/loading.js
enahum 26c365a00b Various Updates and fixes (#559)
* Update to latest mattermost-redux

* Update View.propTypes to ViewPropTypes

* use an empty object if the draft is undefined
2017-05-22 14:17:30 -04: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
}
});