[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:
committed by
Lyubo Marinov
parent
21d419e517
commit
35da39becf
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user