Added custom loading spinner component to improve stlying.

This commit is contained in:
Patrick Fic
2020-11-25 15:50:51 -08:00
parent 7a05c832e9
commit 7c8fd6c717
3 changed files with 36 additions and 2 deletions

View File

@@ -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>
);
}

View File

@@ -0,0 +1,8 @@
.loading-spinner {
display: flex;
flex: 1;
height: 100%;
align-items: center;
justify-content: center;
margin: 1em;
}