Refactored pages styling 2/3
This commit is contained in:
1 parent
b34a17004b
commit
05ffb3d270
20 files changed
+295
-178
No files matched your search
@@ -1,15 +0,0 @@
|
||||
.not-found-page {
|
||||
height: 100vh;
|
||||
}
|
||||
.not-found-page button,
|
||||
.not-found-page p {
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
}
|
||||
.not-found-page h1 {
|
||||
font-size: var(--env-var-font-size-large);
|
||||
font-weight: 600;
|
||||
}
|
||||
.not-found-page h1,
|
||||
.not-found-page p {
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
import Button from "../../Components/Button";
|
||||
import "./index.css";
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import NotFoundSvg from "../../../src/assets/Images/sushi_404.svg";
|
||||
import { Stack, Typography } from "@mui/material";
|
||||
import { useNavigate } from "react-router";
|
||||
import NotFoundSvg from "../../../src/assets/Images/sushi_404.svg";
|
||||
import { useTheme } from "@emotion/react";
|
||||
|
||||
/**
|
||||
* Support for defaultProps will be removed from function components in a future major release
|
||||
@@ -33,16 +33,24 @@ const DefaultValue = {
|
||||
*/
|
||||
const NotFound = ({ title = DefaultValue.title, desc = DefaultValue.desc }) => {
|
||||
const navigate = useNavigate();
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<Stack className="not-found-page" justifyContent="center">
|
||||
<Stack gap="20px" alignItems="center">
|
||||
<Stack height="100vh" justifyContent="center">
|
||||
<Stack
|
||||
gap={theme.spacing(2)}
|
||||
alignItems="center"
|
||||
color={theme.palette.text.secondary}
|
||||
>
|
||||
<img src={NotFoundSvg} alt="404" style={{ maxHeight: "25rem" }} />
|
||||
<Typography component="h1">{title}</Typography>
|
||||
<Typography>{desc}</Typography>
|
||||
<Typography component="h1" fontSize={16} fontWeight={600}>
|
||||
{title}
|
||||
</Typography>
|
||||
<Typography fontSize={13}>{desc}</Typography>
|
||||
<Button
|
||||
label="Go to the main dashboard"
|
||||
level="primary"
|
||||
sx={{ mt: "24px" }}
|
||||
sx={{ mt: theme.spacing(10) }}
|
||||
onClick={() => navigate("/")}
|
||||
/>
|
||||
</Stack>
|
||||
|
||||
Reference in new issue
Block a user