@verifiedinc-public/shared-ui-elements 1.0.1-beta.0 → 1.1.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
import {
|
2
|
+
CircularProgress,
|
3
|
+
Backdrop as MUIBackdrop,
|
4
|
+
Stack,
|
5
|
+
type SxProps,
|
6
|
+
} from '@mui/material';
|
7
|
+
|
8
|
+
interface BackdropProps {
|
9
|
+
open: boolean;
|
10
|
+
sx?: SxProps;
|
11
|
+
children?: React.ReactNode;
|
12
|
+
}
|
13
|
+
|
14
|
+
export const Backdrop = ({
|
15
|
+
open,
|
16
|
+
sx,
|
17
|
+
children,
|
18
|
+
}: BackdropProps): React.JSX.Element => {
|
19
|
+
return (
|
20
|
+
<MUIBackdrop
|
21
|
+
sx={{
|
22
|
+
color: (theme) => theme.palette.primary.main,
|
23
|
+
zIndex: (theme) => theme.zIndex.drawer + 1,
|
24
|
+
...sx,
|
25
|
+
}}
|
26
|
+
open={open}
|
27
|
+
>
|
28
|
+
<Stack alignItems='center' spacing={3}>
|
29
|
+
<CircularProgress color='inherit' />
|
30
|
+
{children}
|
31
|
+
</Stack>
|
32
|
+
</MUIBackdrop>
|
33
|
+
);
|
34
|
+
};
|
package/src/components/index.ts
CHANGED