react-top-loading-bar
Advanced tools
Comparing version 1.0.9 to 1.1.0
@@ -88,2 +88,3 @@ import React, { Component } from 'react'; | ||
}; | ||
/** @deprecated this method contains a typo, use continuousStart */ | ||
_this.continousStart = function (startingValue) { | ||
@@ -104,2 +105,17 @@ var random = startingValue || _this.randomInt(20, 30); | ||
}; | ||
_this.continuousStart = function (startingValue) { | ||
var random = startingValue || _this.randomInt(20, 30); | ||
_this.setState({ progress: random }); | ||
var interval = setInterval(function () { | ||
if (_this.state.progress < 90) { | ||
var random_2 = _this.randomInt(2, 10); | ||
if (!_this.mounted) return false; | ||
_this.setState({ progress: _this.state.progress + random_2 }, function () { | ||
_this.onProgressChange(); | ||
}); | ||
} else { | ||
clearInterval(interval); | ||
} | ||
}, 1000); | ||
}; | ||
_this.staticStart = function (startingValue) { | ||
@@ -106,0 +122,0 @@ var random = startingValue || _this.randomInt(30, 50); |
@@ -93,2 +93,3 @@ 'use strict'; | ||
}; | ||
/** @deprecated this method contains a typo, use continuousStart */ | ||
_this.continousStart = function (startingValue) { | ||
@@ -109,2 +110,17 @@ var random = startingValue || _this.randomInt(20, 30); | ||
}; | ||
_this.continuousStart = function (startingValue) { | ||
var random = startingValue || _this.randomInt(20, 30); | ||
_this.setState({ progress: random }); | ||
var interval = setInterval(function () { | ||
if (_this.state.progress < 90) { | ||
var random_2 = _this.randomInt(2, 10); | ||
if (!_this.mounted) return false; | ||
_this.setState({ progress: _this.state.progress + random_2 }, function () { | ||
_this.onProgressChange(); | ||
}); | ||
} else { | ||
clearInterval(interval); | ||
} | ||
}, 1000); | ||
}; | ||
_this.staticStart = function (startingValue) { | ||
@@ -111,0 +127,0 @@ var random = startingValue || _this.randomInt(30, 50); |
@@ -94,2 +94,3 @@ (function (global, factory) { | ||
}; | ||
/** @deprecated this method contains a typo, use continuousStart */ | ||
_this.continousStart = function (startingValue) { | ||
@@ -110,2 +111,17 @@ var random = startingValue || _this.randomInt(20, 30); | ||
}; | ||
_this.continuousStart = function (startingValue) { | ||
var random = startingValue || _this.randomInt(20, 30); | ||
_this.setState({ progress: random }); | ||
var interval = setInterval(function () { | ||
if (_this.state.progress < 90) { | ||
var random_2 = _this.randomInt(2, 10); | ||
if (!_this.mounted) return false; | ||
_this.setState({ progress: _this.state.progress + random_2 }, function () { | ||
_this.onProgressChange(); | ||
}); | ||
} else { | ||
clearInterval(interval); | ||
} | ||
}, 1000); | ||
}; | ||
_this.staticStart = function (startingValue) { | ||
@@ -112,0 +128,0 @@ var random = startingValue || _this.randomInt(30, 50); |
{ | ||
"name": "react-top-loading-bar", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "A very simple, highly customisable react top loader component.", | ||
@@ -53,3 +53,3 @@ "author": { | ||
"start": "rollup -c -w", | ||
"prepare": "yarn run build", | ||
"prepare": "npm run build", | ||
"predeploy": "cd example && yarn install && yarn run build", | ||
@@ -65,2 +65,4 @@ "deploy": "gh-pages -d example/build" | ||
"@svgr/rollup": "^2.4.1", | ||
"@types/react": "^16.9.1", | ||
"@types/react-dom": "^16.8.5", | ||
"babel-core": "^6.26.3", | ||
@@ -99,6 +101,3 @@ "babel-eslint": "^8.2.5", | ||
], | ||
"dependencies": { | ||
"@types/react": "^16.8.23", | ||
"@types/react-dom": "^16.8.4" | ||
} | ||
"dependencies": {} | ||
} |
@@ -51,4 +51,4 @@ # react-top-loading-bar | ||
/> | ||
<button onClick={() => this.LoadingBar.continousStart()}> | ||
Start Continous Bar Loading | ||
<button onClick={() => this.LoadingBar.continuousStart()}> | ||
Start Continuous Bar Loading | ||
</button> | ||
@@ -122,3 +122,4 @@ <button onClick={() => this.LoadingBar.staticStart()}> | ||
| decrease(value) | Number | Decreases a value to the loading indicator. | | ||
| continousStart(startingValue) | Number (optional) | Starts the loading indicator with a random starting value between 20-30, then repetitively after an interval of 1s increases it by a random value between 2-10. This continues until it reaches 90% of the indicator's width. | | ||
| continousStart(startingValue) [typo - deprecated, use continuousStart] | Number (optional) | Starts the loading indicator with a random starting value between 20-30, then repetitively after an interval of 1s increases it by a random value between 2-10. This continues until it reaches 90% of the indicator's width. | | ||
| continuousStart(startingValue) | Number (optional) | Starts the loading indicator with a random starting value between 20-30, then repetitively after an interval of 1s increases it by a random value between 2-10. This continues until it reaches 90% of the indicator's width. | | ||
| staticStart(startingValue) | Number (optional) | Starts the loading indicator with a random starting value between 30-50. | | ||
@@ -125,0 +126,0 @@ | complete() | | Makes the loading indicator reach 100% of his width and then fade. | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
81151
3
726
153
32
- Removed@types/react@^16.8.23
- Removed@types/react-dom@^16.8.4
- Removed@types/prop-types@15.7.13(transitive)
- Removed@types/react@16.14.62(transitive)
- Removed@types/react-dom@16.9.24(transitive)
- Removed@types/scheduler@0.16.8(transitive)
- Removedcsstype@3.1.3(transitive)