mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 19:23:47 +08:00
34 lines
669 B
TypeScript
34 lines
669 B
TypeScript
import React from "react";
|
|
import { Box, CircularProgress } from "@mui/material";
|
|
|
|
export interface BaseLoadingOverlayProps {
|
|
isLoading: boolean;
|
|
}
|
|
|
|
export const BaseLoadingOverlay: React.FC<BaseLoadingOverlayProps> = ({
|
|
isLoading,
|
|
}) => {
|
|
if (!isLoading) return null;
|
|
|
|
return (
|
|
<Box
|
|
sx={{
|
|
position: "absolute",
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
display: "flex",
|
|
justifyContent: "center",
|
|
alignItems: "center",
|
|
backgroundColor: "rgba(255, 255, 255, 0.7)",
|
|
zIndex: 1000,
|
|
}}
|
|
>
|
|
<CircularProgress />
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default BaseLoadingOverlay;
|