1.0.2 • Published 5 years ago

working-on-it v1.0.2

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

Working on It

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;
iOSAndroid

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
backgroundStyleChange View style that is behind loading indicator
boxStyleChange the View that is holding loading indicator
loadIndicatorSizeIt's loading size, can be: small or large