Files
grungnet/src/components/LoadingOverlay.js

33 lines
559 B
JavaScript
Raw Normal View History

2020-04-14 17:36:25 +10:00
import React from "react";
import { Box } from "theme-ui";
2020-04-14 17:36:25 +10:00
import Spinner from "./Spinner";
function LoadingOverlay({ bg }) {
2020-04-14 17:36:25 +10:00
return (
<Box
sx={{
position: "absolute",
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
top: 0,
left: 0,
flexDirection: "column",
zIndex: 2,
2020-04-14 17:36:25 +10:00
}}
2020-07-17 16:19:59 +10:00
bg={bg}
2020-04-14 17:36:25 +10:00
>
<Spinner />
</Box>
);
}
2020-07-17 16:19:59 +10:00
LoadingOverlay.defaultProps = {
bg: "muted",
};
2020-04-14 17:36:25 +10:00
export default LoadingOverlay;