[RN] NetworkActivityIndicator

The basic indicator is extracted into a LoadingIndicator component,
which then NetworkActivityIndicator displays (or not) based on network
activity.
This commit is contained in:
Saúl Ibarra Corretgé
2017-09-20 15:59:56 -05:00
committed by Lyubo Marinov
parent 21d419e517
commit 35da39becf
7 changed files with 90 additions and 19 deletions
@@ -0,0 +1,24 @@
/* @flow */
import React, { Component } from 'react';
import { ActivityIndicator } from 'react-native';
/**
* Simple wrapper around React Native's {@code ActivityIndicator}, which
* displays an animated (large) loading indicator.
*/
export default class LoadingIndicator extends Component {
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
return (
<ActivityIndicator
animating = { true }
size = { 'large' } />
);
}
}
@@ -1,3 +1,4 @@
export { default as Container } from './Container';
export { default as Link } from './Link';
export { default as LoadingIndicator } from './LoadingIndicator';
export { default as Text } from './Text';