mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-23 11:22:11 +00:00
Made Loader Stable
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
7fe816c997
commit
c591c2f0a8
@ -6,6 +6,7 @@
|
|||||||
width 100%
|
width 100%
|
||||||
height 7px
|
height 7px
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
z-index 200
|
||||||
|
|
||||||
top 0
|
top 0
|
||||||
&.hide
|
&.hide
|
||||||
|
@ -4,9 +4,22 @@ import { buildClassName } from '../Util'
|
|||||||
import css from './Loader.module.styl'
|
import css from './Loader.module.styl'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
/**
|
||||||
|
* The new Percentage (if you calculate it yourself)
|
||||||
|
*/
|
||||||
percent?: number
|
percent?: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto random loader
|
||||||
|
*/
|
||||||
auto?: {
|
auto?: {
|
||||||
|
/**
|
||||||
|
* the minimum and maximum interval between two increment
|
||||||
|
*/
|
||||||
interval: [number, number]
|
interval: [number, number]
|
||||||
|
/**
|
||||||
|
* the minimum and maximum incrementation (MUST be an integer)
|
||||||
|
*/
|
||||||
increment: [number, number]
|
increment: [number, number]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -15,6 +28,11 @@ interface State {
|
|||||||
percent?: number
|
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> {
|
export default class Loader extends React.Component<Props, State> {
|
||||||
|
|
||||||
public state: State = {}
|
public state: State = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user