front-hub/src/pages/Wallet.tsx

177 lines
6.7 KiB
TypeScript
Raw Normal View History

2022-11-25 18:52:46 +00:00
import { Box, IconButton, Typography, useMediaQuery, useTheme } from "@mui/material";
2022-11-22 21:44:42 +00:00
import CustomButton from "../components/CustomButton";
2022-11-24 18:08:51 +00:00
import WalletIcon from "../components/WalletIcon";
2022-11-22 13:23:47 +00:00
import SectionWrapper from "../components/SectionWrapper";
2022-11-25 18:52:46 +00:00
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
2022-11-22 13:21:49 +00:00
export default function Wallet() {
const theme = useTheme();
2022-11-25 18:52:46 +00:00
const upMd = useMediaQuery(theme.breakpoints.up("md"));
2022-11-22 13:21:49 +00:00
2022-11-25 18:52:46 +00:00
const footnotes = (
<Box
component="ol"
2022-11-22 13:21:49 +00:00
sx={{
2022-11-25 18:52:46 +00:00
color: theme.palette.grey2.main,
pt: "10px",
pl: "25px",
mt: 0,
mb: upMd ? "3px" : "73px",
2022-11-22 13:21:49 +00:00
}}
>
<Typography
2022-11-25 18:52:46 +00:00
component="li"
sx={{
fontSize: "16px",
lineHeight: "20px",
fontWeight: 400,
}}
>
Текст для сносок: текст-заполнитель
это текст, который имеет текст-заполнитель
это текст, который имеет
</Typography>
<Typography
component="li"
2022-11-22 13:21:49 +00:00
sx={{
2022-11-25 18:52:46 +00:00
fontSize: "16px",
lineHeight: "20px",
2022-11-22 13:21:49 +00:00
fontWeight: 400,
}}
>
2022-11-25 18:52:46 +00:00
Текст для сносок: тель
это текст, который имеет текст-заполнитель
это текст, который имеет
</Typography>
</Box>
);
return (
<SectionWrapper
maxWidth="lg"
sx={{
mt: "25px",
mb: "70px",
}}
>
{upMd &&
2022-11-22 13:21:49 +00:00
<Typography
sx={{
fontWeight: 400,
fontSize: "12px",
lineHeight: "14px",
2022-11-25 18:52:46 +00:00
color: theme.palette.grey2.main,
2022-11-22 13:21:49 +00:00
}}
2022-11-25 18:52:46 +00:00
>
{`Все тарифы — `}
<Typography
component="span"
sx={{
fontWeight: 400,
fontSize: "12px",
lineHeight: "14px",
color: theme.palette.fadePurple.main,
textUnderlinePosition: "under",
textDecorationColor: theme.palette.brightPurple.main,
}}
>Мой кошелёк</Typography>
</Typography>
}
<Box
sx={{
mt: "20px",
mb: "40px",
display: "flex",
gap: "10px",
}}
>
{!upMd &&
<IconButton sx={{ p: 0, height: "28px", width: "28px", color: "black" }}>
<ArrowBackIcon />
</IconButton>
}
<Typography variant="h4">Мой кошелёк</Typography>
</Box>
2022-11-22 13:21:49 +00:00
<Box
sx={{
backgroundColor: "white",
display: "flex",
2022-11-25 18:52:46 +00:00
flexDirection: upMd ? "row" : "column",
2022-11-22 13:21:49 +00:00
gap: "9%",
borderRadius: "12px",
2022-11-25 18:52:46 +00:00
mb: "40px",
2022-11-22 13:21:49 +00:00
boxShadow: `0px 100px 309px rgba(210, 208, 225, 0.24),
0px 41.7776px 129.093px rgba(210, 208, 225, 0.172525),
0px 22.3363px 69.0192px rgba(210, 208, 225, 0.143066),
0px 12.5216px 38.6916px rgba(210, 208, 225, 0.12),
0px 6.6501px 20.5488px rgba(210, 208, 225, 0.0969343),
0px 2.76726px 8.55082px rgba(210, 208, 225, 0.0674749)`,
}}
>
<Box
sx={{
2022-11-25 18:52:46 +00:00
width: upMd ? "59.5%" : undefined,
2022-11-22 13:21:49 +00:00
p: "20px",
2022-11-25 18:52:46 +00:00
pb: upMd ? undefined : "10px",
2022-11-22 13:21:49 +00:00
}}
>
2022-11-24 19:22:30 +00:00
<Typography sx={{ color: theme.palette.grey3.main, mb: "30px" }}>Баланс 10.04.2022</Typography>
2022-11-22 13:21:49 +00:00
<Box
sx={{
display: "flex",
alignItems: "center",
gap: "22px",
2022-11-25 18:52:46 +00:00
pb: "40px",
borderBottom: `1px solid ${theme.palette.grey2.main}`,
2022-11-22 13:21:49 +00:00
}}
>
2022-11-24 19:22:30 +00:00
<WalletIcon bgcolor="#FEDFD0" color={theme.palette.orange.main} />
2022-11-22 13:21:49 +00:00
<Typography variant="h5">10 304 руб.</Typography>
</Box>
2022-11-25 18:52:46 +00:00
{upMd && footnotes}
2022-11-22 13:21:49 +00:00
</Box>
<Box
sx={{
display: "flex",
flexDirection: "column",
alignItems: "start",
2022-11-24 19:22:30 +00:00
color: theme.palette.grey3.main,
2022-11-25 18:52:46 +00:00
width: upMd ? "31.5%" : undefined,
2022-11-22 13:21:49 +00:00
p: "20px",
2022-11-25 18:52:46 +00:00
pl: upMd ? "33px" : undefined,
borderLeft: upMd ? `1px solid ${theme.palette.grey2.main}` : undefined,
2022-11-22 13:21:49 +00:00
}}
>
<Box
sx={{
display: "flex",
flexDirection: "column",
gap: "22px",
maxWidth: "85%",
2022-11-25 18:52:46 +00:00
mb: "32px",
2022-11-22 13:21:49 +00:00
}}
>
<Typography>
Текст-заполнитель
это текст, который имеет
</Typography>
<Typography>
Текст-заполнитель
это текст, который имеет
</Typography>
</Box>
2022-11-22 21:44:42 +00:00
<CustomButton
2022-11-22 13:21:49 +00:00
variant="contained"
sx={{
2022-11-24 19:22:30 +00:00
backgroundColor: theme.palette.brightPurple.main,
2022-11-22 13:21:49 +00:00
textColor: "white",
2022-11-25 18:52:46 +00:00
mt: "auto",
2022-11-22 13:21:49 +00:00
}}
2022-11-22 21:44:42 +00:00
>Пополнить</CustomButton>
2022-11-22 13:21:49 +00:00
</Box>
</Box>
2022-11-25 18:52:46 +00:00
{!upMd && footnotes}
2022-11-22 14:43:39 +00:00
</SectionWrapper>
2022-11-22 13:21:49 +00:00
);
}