Spaces:
Running
Running
File size: 676 Bytes
3299552 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import React from 'react';
import { Box } from '@mui/material';
import Header from './Header';
import Footer from './Footer';
import styled from '@emotion/styled';
const MainContent = styled(Box)(({ theme }) => ({
minHeight: 'calc(100vh - 128px)', // Adjust based on your header/footer height
padding: theme.spacing(3),
[theme.breakpoints.down('sm')]: {
padding: theme.spacing(2),
},
}));
const MainLayout = ({ children }) => {
return (
<Box display="flex" flexDirection="column" minHeight="100vh">
<Header />
<MainContent component="main">
{children}
</MainContent>
<Footer />
</Box>
);
};
export default MainLayout; |