1.0.0 • Published 9 years ago

react-simple-loader v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

React Simple Loading Component

This is a simple loading component to include in your React application.

To use, do the following:

npm install react-simple-loader

An example: Sample.jsx

import { Component, PropTypes } from "react";
import ReactSimpleLoader from "react-simple-loader";

class Sample extends Component {
	render() {
		const { item } = this.props;

		if (!item) {
			return <ReactSimpleLoader/>
		}

		return (
			<div>Hello World</div>
		);
	}
}

Sample.propTypes = {
	item: PropTypes.object
}

export default Sample;

There are various props you may customise:

proptypeexample
colorstring"#fff"
topstring"100px"
backgroundColorstring"rgba(0,0,0,0.5)"
borderRadiusstring"4px"
fullScreenbooleanfalse

For any issues, please use github issues.