mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 04:50:12 +02:00
add LoadingOverlay component
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
LoadingOverlay as MantineLoadingOverlay,
|
||||
LoadingOverlayProps as MantineLoadingOverlayProps,
|
||||
} from '@mantine/core';
|
||||
|
||||
import { Spinner } from '/@/shared/components/spinner/spinner';
|
||||
|
||||
interface LoadingOverlayProps extends MantineLoadingOverlayProps {
|
||||
color?: string;
|
||||
opacity?: number;
|
||||
}
|
||||
|
||||
export const LoadingOverlay = ({ ...props }: LoadingOverlayProps) => {
|
||||
return (
|
||||
<MantineLoadingOverlay
|
||||
loaderProps={{ children: <Spinner /> }}
|
||||
overlayProps={{
|
||||
color: 'var(--theme-colors-background)',
|
||||
opacity: 0.5,
|
||||
}}
|
||||
transitionProps={{
|
||||
duration: 0.5,
|
||||
transition: 'fade',
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user