Skip to content

Commit

Permalink
Error component add
Browse files Browse the repository at this point in the history
  • Loading branch information
mwlt68 committed Jan 28, 2023
1 parent 14b67f0 commit 74e869a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/components/ui/error-page/ErrorPageWithLottie.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Alert, Box } from "@mui/material";
import Lottie from "lottie-react";
import errorAnimation from "../../../assets/lotties/error.json"

export function ErrorPageWithLottie(props:any){
const styles={
container:{
display: "flex",
height: "100%",
width: "100%",
flexDirection: "column",
alignItems:"center",
justifyContent: "center",
gap: "1rem"
},
alert:{
maxWidth:"50%"
}
}
return(
<Box sx={styles.container}>
<Lottie animationData={errorAnimation} loop={true}/>
<Alert variant="filled" severity="error" sx={styles.alert} >
{props.message}
</Alert>
</Box>
);
}

0 comments on commit 74e869a

Please sign in to comment.