From c591c2f0a8ed575f2cf38a166f6e07b06e115956 Mon Sep 17 00:00:00 2001 From: Florian BOUILLON Date: Thu, 1 Apr 2021 10:19:32 +0200 Subject: [PATCH] Made Loader Stable Signed-off-by: Florian BOUILLON --- src/dzeio/Loader/Loader.module.styl | 1 + src/dzeio/Loader/index.tsx | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/dzeio/Loader/Loader.module.styl b/src/dzeio/Loader/Loader.module.styl index 9247aad..04f2252 100644 --- a/src/dzeio/Loader/Loader.module.styl +++ b/src/dzeio/Loader/Loader.module.styl @@ -6,6 +6,7 @@ width 100% height 7px pointer-events none + z-index 200 top 0 &.hide diff --git a/src/dzeio/Loader/index.tsx b/src/dzeio/Loader/index.tsx index 5766343..8584379 100644 --- a/src/dzeio/Loader/index.tsx +++ b/src/dzeio/Loader/index.tsx @@ -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 { public state: State = {}