1.0.0 • Published 7 years ago

react-native-loader-place v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Loader Place for React Native Projects

Installation

$ npm install react-native-loader-place --save

Demo

Can use when you need to show something on screen before data loaded.

Usage

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

import { Circle, Rectangle } from 'react-native-loader-place'

export default class LoaderPlace extends Component {
  render() {
    return (
      <View style={styles.container}>

        <Rectangle
            height={10}
            width={50}
            loaded={false}
            duration={900}
            backgroundColor = 'blue',
            animationColor = 'blue',
            style = {{ padding: 10}}>

            <Text>Onur Orhan</Text>

        </Rectangle>

      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    marginTop:50
  },
});

Props for Rectangle

All properties are optional

PropTypeDefaultDescription
heightNumber15used to specify the height of the rectangle
widthNumber70used to specify the width of the rectangle
durationNumber900transition speed of animation
backgroundColorStringbluefor a faint color on the background
animationColorStringbluethe color of the animation that will pass above the background
styleObjectjustifyContent:'center', alignItems:'center'style of the Rectangle Loader
loadedBooleantrueif loaded is false that will be enable loading animation

Props for Circle

All properties are optional

PropTypeDefaultDescription
radiusNumber30used to specify the size of the circle, if radius is 20, size of circle 40x40 as width and height
durationNumber900transition speed of animation
backgroundColorStringbluefor a faint color on the background
animationColorStringbluethe color of the animation that will pass above the background
styleObjectjustifyContent:'center', alignItems:'center'style of the Circle Loader
loadedBooleantrueif loaded is false that will be enable loading animation

Support

Email onurorhan04@gmail.com for support