Create StickyFooter.jsx

This commit is contained in:
谷風天音 | 是一个浓度纯度都比较高的柚子厨,因为柚子社天下第一!时不时发柚子的癫。有个能干的妹妹真好,たにかぜ あまね天下第一喵,关注谷風天音谢谢喵,关注谷風天音谢谢喵,谢谢在这里看我发癫,天音妹妹真的好好看喵,单推天音一辈子!谁不推天音就打爆他的宁宁的起爆器!\柚子社/\柚子社/\柚子社/\天音/\天音/\天音/天音,我真的好喜欢你啊,为了你,我要 0721!\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/\たにかぜ あまね/ 2023-03-30 23:20:21 +08:00 committed by GitHub
parent 81ca8b10da
commit 6e871dcf20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 62 additions and 0 deletions

62
src/StickyFooter.jsx Normal file
View File

@ -0,0 +1,62 @@
import * as React from 'react';
import CssBaseline from '@mui/material/CssBaseline';
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import Container from '@mui/material/Container';
import Link from '@mui/material/Link';
function Copyright() {
return (
<Typography variant="body2" color="text.secondary">
{'Copyright © '}
<Link color="inherit" href="https://mui.com/">
Your Website
</Link>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}
export default function StickyFooter() {
return (
<Box
sx={{
display: 'flex',
flexDirection: 'column',
minHeight: '100vh',
}}
>
<CssBaseline />
<Container component="main" sx={{ mt: 8, mb: 2 }} maxWidth="sm">
<Typography variant="h2" component="h1" gutterBottom>
Sticky footer
</Typography>
<Typography variant="h5" component="h2" gutterBottom>
{'Pin a footer to the bottom of the viewport.'}
{'The footer will move as the main element of the page grows.'}
</Typography>
<Typography variant="body1">Sticky footer placeholder.</Typography>
</Container>
<Box
component="footer"
sx={{
py: 3,
px: 2,
mt: 'auto',
backgroundColor: (theme) =>
theme.palette.mode === 'light'
? theme.palette.grey[200]
: theme.palette.grey[800],
}}
>
<Container maxWidth="sm">
<Typography variant="body1">
My sticky footer can be found here.
</Typography>
<Copyright />
</Container>
</Box>
</Box>
);
}