add a background component

This commit is contained in:
Alex Holliday committed 2025-06-12 09:37:51 +08:00
1 parent 275f2384c0
commit 1574624f69
6 files changed
+91 -13

No files matched your search

@@ -0,0 +1,30 @@
import Box from "@mui/material/Box";
import PropTypes from "prop-types";
import { useTheme } from "@emotion/react";
import BackgroundSVG from "../../../assets/Images/background.svg";
const AppLayout = ({ children }) => {
const theme = useTheme();
return (
<Box
sx={{
minHeight: "100vh",
backgroundColor: theme.palette.primaryBackground.main,
backgroundImage: `url("${BackgroundSVG}")`,
backgroundSize: "100% 100%",
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
color: theme.palette.primary.contrastText,
}}
>
{children}
</Box>
);
};
AppLayout.propTypes = {
children: PropTypes.node,
};
export default AppLayout;