react-loader
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -15,27 +15,32 @@ (function (root, factory) { | ||
propTypes: { | ||
className: React.PropTypes.string, | ||
color: React.PropTypes.string, | ||
component: React.PropTypes.any, | ||
corners: React.PropTypes.number, | ||
direction: React.PropTypes.oneOf([1, -1]), | ||
hwaccell: React.PropTypes.bool, | ||
left: React.PropTypes.string, | ||
length: React.PropTypes.number, | ||
lines: React.PropTypes.number, | ||
loaded: React.PropTypes.bool, | ||
loadedClassName: React.PropTypes.string, | ||
options: React.PropTypes.object, | ||
scale: React.PropTypes.number, | ||
lines: React.PropTypes.number, | ||
length: React.PropTypes.number, | ||
width: React.PropTypes.number, | ||
parentClassName: React.PropTypes.string, | ||
radius: React.PropTypes.number, | ||
corners: React.PropTypes.number, | ||
rotate: React.PropTypes.number, | ||
direction: React.PropTypes.oneOf([1, -1]), | ||
color: React.PropTypes.string, | ||
scale: React.PropTypes.number, | ||
shadow: React.PropTypes.bool, | ||
speed: React.PropTypes.number, | ||
top: React.PropTypes.string, | ||
trail: React.PropTypes.number, | ||
shadow: React.PropTypes.bool, | ||
hwaccell: React.PropTypes.bool, | ||
className: React.PropTypes.string, | ||
zIndex: React.PropTypes.number, | ||
top: React.PropTypes.string, | ||
left: React.PropTypes.string, | ||
loadedClassName: React.PropTypes.string | ||
width: React.PropTypes.number, | ||
zIndex: React.PropTypes.number | ||
}, | ||
getDefaultProps: function () { | ||
return { component: 'div', loadedClassName: 'loadedContent' }; | ||
return { | ||
component: 'div', | ||
loadedClassName: 'loadedContent', | ||
parentClassName: 'loader' | ||
}; | ||
}, | ||
@@ -101,3 +106,3 @@ | ||
} else { | ||
props = { key: 'loader', ref: 'loader', className: 'loader' }; | ||
props = { key: 'loader', ref: 'loader', className: this.props.parentClassName }; | ||
} | ||
@@ -104,0 +109,0 @@ |
@@ -15,27 +15,32 @@ (function (root, factory) { | ||
propTypes: { | ||
className: React.PropTypes.string, | ||
color: React.PropTypes.string, | ||
component: React.PropTypes.any, | ||
corners: React.PropTypes.number, | ||
direction: React.PropTypes.oneOf([1, -1]), | ||
hwaccell: React.PropTypes.bool, | ||
left: React.PropTypes.string, | ||
length: React.PropTypes.number, | ||
lines: React.PropTypes.number, | ||
loaded: React.PropTypes.bool, | ||
loadedClassName: React.PropTypes.string, | ||
options: React.PropTypes.object, | ||
scale: React.PropTypes.number, | ||
lines: React.PropTypes.number, | ||
length: React.PropTypes.number, | ||
width: React.PropTypes.number, | ||
parentClassName: React.PropTypes.string, | ||
radius: React.PropTypes.number, | ||
corners: React.PropTypes.number, | ||
rotate: React.PropTypes.number, | ||
direction: React.PropTypes.oneOf([1, -1]), | ||
color: React.PropTypes.string, | ||
scale: React.PropTypes.number, | ||
shadow: React.PropTypes.bool, | ||
speed: React.PropTypes.number, | ||
top: React.PropTypes.string, | ||
trail: React.PropTypes.number, | ||
shadow: React.PropTypes.bool, | ||
hwaccell: React.PropTypes.bool, | ||
className: React.PropTypes.string, | ||
zIndex: React.PropTypes.number, | ||
top: React.PropTypes.string, | ||
left: React.PropTypes.string, | ||
loadedClassName: React.PropTypes.string | ||
width: React.PropTypes.number, | ||
zIndex: React.PropTypes.number | ||
}, | ||
getDefaultProps: function () { | ||
return { component: 'div', loadedClassName: 'loadedContent' }; | ||
return { | ||
component: 'div', | ||
loadedClassName: 'loadedContent', | ||
parentClassName: 'loader' | ||
}; | ||
}, | ||
@@ -101,3 +106,3 @@ | ||
} else { | ||
props = { key: 'loader', ref: 'loader', className: 'loader' }; | ||
props = { key: 'loader', ref: 'loader', className: this.props.parentClassName }; | ||
} | ||
@@ -104,0 +109,0 @@ |
{ | ||
"name": "react-loader", | ||
"description": "React component that displays a spinner via spin.js until your component is loaded", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "lib/react-loader.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -19,2 +19,12 @@ /** @jsx React.DOM */ | ||
{ | ||
description: 'loading is in progress with custom className on the loader component', | ||
props: { loaded: false, parentClassName: 'my-loader-class' }, | ||
expectedOutput: /<div class="my-loader-class"[^>]*?><div class="spinner"/ | ||
}, | ||
{ | ||
description: 'loading is in progress with custom className on the spinner component', | ||
props: { loaded: false, className: 'my-spinner-class' }, | ||
expectedOutput: /<div class="loader"[^>]*?><div class="my-spinner-class"/ | ||
}, | ||
{ | ||
description: 'loading is in progress with spinner options', | ||
@@ -21,0 +31,0 @@ props: { loaded: false, radius: 17, width: 900 }, |
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
17991
11
293