mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-28 13:21:42 +00:00
* grouped permissions and added styles * Adding loading overlay for the permission sections
32 lines
696 B
TypeScript
32 lines
696 B
TypeScript
import { Overlay, Spinner, SpinnerSize } from "@fluentui/react";
|
|
import React from "react";
|
|
|
|
interface LoadingOverlayProps {
|
|
isLoading: boolean;
|
|
label: string;
|
|
}
|
|
|
|
const LoadingOverlay: React.FC<LoadingOverlayProps> = ({ isLoading, label }) => {
|
|
if (!isLoading) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Overlay
|
|
styles={{
|
|
root: {
|
|
backgroundColor: "rgba(255,255,255,0.9)",
|
|
zIndex: 9999,
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
},
|
|
}}
|
|
>
|
|
<Spinner size={SpinnerSize.large} label={label} styles={{ label: { fontWeight: 600 } }} />
|
|
</Overlay>
|
|
);
|
|
};
|
|
|
|
export default LoadingOverlay;
|