Presupuestador_web/client/src/components/LoadingOverlay/LoadingOverlay.tsx

27 lines
681 B
TypeScript
Raw Normal View History

2024-08-24 09:32:52 +00:00
import { t } from "i18next";
2024-06-06 11:05:54 +00:00
import { LoadingIndicator } from "../LoadingIndicator";
export type LoadingOverlayProps = {
title?: string;
subtitle?: string;
};
export const LoadingOverlay = ({
2024-08-24 09:32:52 +00:00
title = t("components.loading_overlay.title"),
subtitle = t("components.loading_overlay.subtitle"),
2024-06-06 11:05:54 +00:00
...props
}: LoadingOverlayProps) => {
return (
2024-08-24 09:32:52 +00:00
<div
className={
"fixed top-0 bottom-0 left-0 right-0 z-50 w-full h-screen overflow-hidden flex justify-center bg-secondary-foreground/85"
}
{...props}
>
<LoadingIndicator look='dark' title={title} subtitle={subtitle} />
2024-06-06 11:05:54 +00:00
</div>
);
};
LoadingOverlay.displayName = "LoadingOverlay";