Presupuestador_web/client/src/components/LoadingOverlay/LoadingOverlay.tsx
2024-08-24 11:32:52 +02:00

27 lines
681 B
TypeScript

import { t } from "i18next";
import { LoadingIndicator } from "../LoadingIndicator";
export type LoadingOverlayProps = {
title?: string;
subtitle?: string;
};
export const LoadingOverlay = ({
title = t("components.loading_overlay.title"),
subtitle = t("components.loading_overlay.subtitle"),
...props
}: LoadingOverlayProps) => {
return (
<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} />
</div>
);
};
LoadingOverlay.displayName = "LoadingOverlay";