Skip to content

fonseca-leonardo/working-on-it

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Working on It

platforms npm npm

It's a loading indicator designed to be use on react-native forms. When Working on It is rendered it will block all parent View inputs, use it after user submitting a form and block his inputs while waiting for an API response.

Example

import React from 'react';
import {
  View,
  Text,
  StyleSheet
} from 'react-native';

import WorkingOnIt from 'working-on-It';

const App = () => {
  return (
    <View style={styles.container}>
      <WorkingOnIt loadIndicatorSize="large" />
      <View >
        <Text>Here a simple text for an example</Text>
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center"
  }
})

export default App;
iOS Android

Also, you can use your own loading indicator. Just place your indicator as Working on It children:

const App = () => {
  return (
    <View style={styles.container}>
      <WorkingOnIt loadIndicatorSize="large" >
        {/*YOUR LOAD INDICATOR HERE*/}
        <Text>Loading...</Text>
      </WorkingOnIt>
      <View >
        <Text>Here a simple text for an example</Text>
      </View>
    </View>
  );
};

props
backgroundStyle Change View style that is behind loading indicator
boxStyle Change the View that is holding loading indicator
loadIndicatorSize It's loading size, can be: small or large

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published