B2B-88: add starter kit structure and elements
This commit is contained in:
33
packages/ui/src/makerkit/loading-overlay.tsx
Normal file
33
packages/ui/src/makerkit/loading-overlay.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
import { cn } from '../lib/utils';
|
||||
import { Spinner } from './spinner';
|
||||
|
||||
export function LoadingOverlay({
|
||||
children,
|
||||
className,
|
||||
fullPage = true,
|
||||
spinnerClassName,
|
||||
}: PropsWithChildren<{
|
||||
className?: string;
|
||||
spinnerClassName?: string;
|
||||
fullPage?: boolean;
|
||||
displayLogo?: boolean;
|
||||
}>) {
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'flex flex-col items-center justify-center space-y-4',
|
||||
className,
|
||||
{
|
||||
[`bg-background fixed top-0 left-0 z-100 h-screen w-screen`]:
|
||||
fullPage,
|
||||
},
|
||||
)}
|
||||
>
|
||||
<Spinner className={spinnerClassName} />
|
||||
|
||||
<div className={'text-muted-foreground text-sm'}>{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user