3.0.0 • Published 7 years ago

react-native-simplest-hud v3.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

The simplest network load indicator of react-native

If you want to learn React-Native cross platform project,Check out ComicBook.

Design sketch

progress-hud-screen progress-hud-screen progress-hud-screen progress-hud-screen progress-hud-screen

Install

npm install --save react-native-simplest-hud

Usage

import { RNProgressHUD,mixin } from 'react-native-simplest-hud';

import jsonData from './data.json';

class ExamplePage extends  mixin(RNProgressHUD.Mixin){
<!--mixin(RNProgressHUD.Mixin) replace Component-->
    ...
    render(){
        return(
            <View style={{flex: 1,backgroundColor: 'white'}}>
                ...
                <RNProgressHUD
                    isVisible={this.state.is_hud_visible} //Fixed writing
                    color='rgb(69,149,252)' //hud color
                    label="Loading..."  //"" or "Prompt string"
                    isActivityIndicator={true} //true or false
                />
                ...
            </View>
        );
    }
}

Showing the HUD

You can display the HUD by calling:

  this.showHUD();

Dismissing the HUD

It can be hide by calling:

  this.hideHUD();

Props

The following props can be used to modify the HUD's style and/or behaviour:

PropTypeOpt/RequiredDefaultNote
isVisibleBooleanRequiredN/ADisplays the HUD when set to true.
isActivityIndicatorBooleanOptionalfalseWhen set to true, the HUD is show by the ActivityIndicator style,or showing by the Rotating ring style.
labelStringOptionalLoading...Sets Prompt string of the HUD.
colorStringOptionalrgb(69,149,252)Sets the color of the HUD spinner.
3.0.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago