mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-10 10:11:47 +00:00
Create Loading state
This commit is contained in:
16
dashboard/src/states/Loading/Loading.jsx
Normal file
16
dashboard/src/states/Loading/Loading.jsx
Normal file
@ -0,0 +1,16 @@
|
||||
import {LinearProgress, Stack, useTheme} from "@mui/material";
|
||||
import DarkLogo from "@/common/assets/images/logo/dark.webp";
|
||||
import LightLogo from "@/common/assets/images/logo/light.webp";
|
||||
|
||||
export const Loading = ({progress}) => {
|
||||
const theme = useTheme();
|
||||
const logo = theme.palette.mode === "dark" ? DarkLogo : LightLogo;
|
||||
|
||||
return (
|
||||
<Stack justifyContent="center" alignItems="center" sx={{height: "100vh"}} gap={5}>
|
||||
<img src={logo} alt="Logo" style={{width: "25rem"}}/>
|
||||
<LinearProgress variant={progress ? "determinate" : "indeterminate"} sx={{width: "20rem"}}
|
||||
value={progress}/>
|
||||
</Stack>
|
||||
)
|
||||
}
|
||||
1
dashboard/src/states/Loading/index.js
Normal file
1
dashboard/src/states/Loading/index.js
Normal file
@ -0,0 +1 @@
|
||||
export {Loading as default} from "./Loading.jsx";
|
||||
Reference in New Issue
Block a user