Made Loader Stable

Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-04-01 10:19:32 +02:00
parent 7fe816c997
commit c591c2f0a8
2 changed files with 19 additions and 0 deletions

View File

@ -6,6 +6,7 @@
width 100%
height 7px
pointer-events none
z-index 200
top 0
&.hide

View File

@ -4,9 +4,22 @@ import { buildClassName } from '../Util'
import css from './Loader.module.styl'
interface Props {
/**
* The new Percentage (if you calculate it yourself)
*/
percent?: number
/**
* Auto random loader
*/
auto?: {
/**
* the minimum and maximum interval between two increment
*/
interval: [number, number]
/**
* the minimum and maximum incrementation (MUST be an integer)
*/
increment: [number, number]
}
}
@ -15,6 +28,11 @@ interface State {
percent?: number
}
/**
* Display a simple loading animation at the top of the page
*
* @version 1.0.0
*/
export default class Loader extends React.Component<Props, State> {
public state: State = {}