mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-11 21:50:05 +00:00
* added a dark theme toggle button on Copyjobs next to refresh button and covered full feature * Fix formatting in Utils.test.ts * updated infor icon , error icon and text on jobs details page * rebased from master * updated the conflicts * updated the conflicts * fixed the test suit * fixed review comments * test fix --------- Co-authored-by: Sakshi Gupta <sakshig@microsoft.com>
39 lines
955 B
TypeScript
39 lines
955 B
TypeScript
import { Overlay, Spinner, SpinnerSize } from "@fluentui/react";
|
|
import { useThemeStore } from "hooks/useTheme";
|
|
import React from "react";
|
|
|
|
interface LoadingOverlayProps {
|
|
isLoading: boolean;
|
|
label: string;
|
|
}
|
|
|
|
const LoadingOverlay: React.FC<LoadingOverlayProps> = ({ isLoading, label }) => {
|
|
const isDarkMode = useThemeStore((state) => state.isDarkMode);
|
|
if (!isLoading) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Overlay
|
|
data-test="loading-overlay"
|
|
styles={{
|
|
root: {
|
|
backgroundColor: isDarkMode ? "rgba(32, 31, 30, 0.9)" : "rgba(255,255,255,0.9)",
|
|
zIndex: 9999,
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
},
|
|
}}
|
|
>
|
|
<Spinner
|
|
size={SpinnerSize.large}
|
|
label={label}
|
|
styles={{ label: { fontWeight: 600, color: isDarkMode ? "#ffffff" : "#323130" } }}
|
|
/>
|
|
</Overlay>
|
|
);
|
|
};
|
|
|
|
export default LoadingOverlay;
|