react-loading-animation
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -60,2 +60,12 @@ 'use strict'; | ||
if (isLoading) { | ||
var _props2 = this.props; | ||
var width = _props2.width; | ||
var height = _props2.height; | ||
var margin = _props2.margin; | ||
loading_style.width = width; | ||
loading_style.height = height; | ||
loading_style.margin = margin; | ||
return React.createElement( | ||
@@ -89,9 +99,15 @@ 'div', | ||
Loading.propTypes = { | ||
isLoading: React.PropTypes.bool | ||
isLoading: React.PropTypes.bool, | ||
width: React.PropTypes.string, | ||
height: React.PropTypes.string, | ||
margin: React.PropTypes.string | ||
}; | ||
Loading.defaultProps = { | ||
isLoading: true | ||
isLoading: true, | ||
width: '40px', | ||
height: '40px', | ||
margin: '0 auto' | ||
}; | ||
module.exports = Loading; |
{ | ||
"name": "react-loading-animation", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A pretty loading spinner based on Google's colorful spinner animation.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -8,3 +8,3 @@ # React Loading Animation | ||
```js | ||
```javascript | ||
const Loading = require('react-loading-animation'); | ||
@@ -16,3 +16,3 @@ ``` | ||
```js | ||
```javascript | ||
const ListOfThings = ({ isFetching, things }) => { | ||
@@ -31,3 +31,3 @@ if (isFetching && things.size() == 0) return <Loading />; | ||
```js | ||
```javascript | ||
const ListOfThings = ({ isFetching, things }) => { | ||
@@ -34,0 +34,0 @@ return ( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6588
91