31 lines
750 B
TypeScript
31 lines
750 B
TypeScript
import Box from "@mui/material/Box";
|
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
import Typography from "@mui/material/Typography";
|
|
|
|
export interface LoadingStateProps {
|
|
label?: string;
|
|
}
|
|
|
|
/** Centered loading indicator — replaces admin-loading/admin-spinner CSS patterns. */
|
|
export default function LoadingState({ label }: LoadingStateProps) {
|
|
return (
|
|
<Box
|
|
sx={{
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
py: 8,
|
|
gap: 2,
|
|
}}
|
|
>
|
|
<CircularProgress size={36} />
|
|
{label && (
|
|
<Typography variant="body2" color="text.secondary">
|
|
{label}
|
|
</Typography>
|
|
)}
|
|
</Box>
|
|
);
|
|
}
|