Added custom loading spinner component to improve stlying.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import React from "react";
|
||||
import { Spin } from "antd";
|
||||
import "./loading-spinner.styles.scss";
|
||||
|
||||
export default function LoadingSpinnerAtom({
|
||||
loading = true,
|
||||
message,
|
||||
...props
|
||||
}) {
|
||||
return (
|
||||
<div className="loading-spinner">
|
||||
<Spin
|
||||
spinning={loading}
|
||||
size="large"
|
||||
style={{
|
||||
position: "relative",
|
||||
alignContent: "center",
|
||||
}}
|
||||
tip={message ? message : null}
|
||||
>
|
||||
{props.children}
|
||||
</Spin>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
.loading-spinner {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 1em;
|
||||
}
|
||||
Reference in New Issue
Block a user