front-hub/src/pages/Payment/Payment.tsx

131 lines
5.4 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-22 14:43:59 +00:00
import SectionWrapper from "../../components/SectionWrapper";
import PaymentMethodCard from "./PaymentMethodCard";
import mastercardLogo from "../../assets/logo-mastercard.png";
import visaLogo from "../../assets/logo-visa.png";
import qiwiLogo from "../../assets/logo-qiwi.png";
import mirLogo from "../../assets/logo-mir.png";
import tinkoffLogo from "../../assets/logo-tinkoff.png";
2022-11-25 18:52:46 +00:00
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
2022-12-04 12:41:10 +00:00
import ComplexNavText from "../../components/ComplexNavText";
2022-11-22 14:43:59 +00:00
export default function Payment() {
const theme = useTheme();
2022-11-25 18:52:46 +00:00
const upMd = useMediaQuery(theme.breakpoints.up("md"));
const upSm = useMediaQuery(theme.breakpoints.up("sm"));
2022-11-22 14:43:59 +00:00
return (
<SectionWrapper
maxWidth="lg"
sx={{
mt: "25px",
mb: "70px",
}}
>
2022-11-25 18:52:46 +00:00
{upMd &&
2022-12-04 12:41:10 +00:00
<ComplexNavText text1="Все тарифы — " text2="Способ оплаты" />
2022-11-25 18:52:46 +00:00
}
2022-11-22 14:43:59 +00:00
<Box
sx={{
2022-11-25 18:52:46 +00:00
mt: "20px",
mb: "40px",
2022-11-22 14:43:59 +00:00
display: "flex",
2022-11-25 18:52:46 +00:00
gap: "10px",
}}
>
{!upMd &&
<IconButton sx={{ p: 0, height: "28px", width: "28px", color: "black" }}>
<ArrowBackIcon />
</IconButton>
}
<Typography variant="h4">Способ оплаты</Typography>
</Box>
{!upMd &&
<Typography variant="body2" mb="30px">Выберите способ оплаты</Typography>
}
<Box
sx={{
backgroundColor: upMd ? "white" : undefined,
display: "flex",
flexDirection: upMd ? "row" : "column",
2022-11-22 14:43:59 +00:00
borderRadius: "12px",
2022-11-25 18:52:46 +00:00
boxShadow: upMd ? `0px 100px 309px rgba(210, 208, 225, 0.24),
2022-11-22 14:43:59 +00:00
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),
2022-11-25 18:52:46 +00:00
0px 2.76726px 8.55082px rgba(210, 208, 225, 0.0674749)`
:
undefined,
2022-11-22 14:43:59 +00:00
}}
>
<Box
sx={{
2022-11-25 18:52:46 +00:00
width: upMd ? "68.5%" : undefined,
p: upMd ? "20px" : undefined,
2022-11-22 14:43:59 +00:00
display: "flex",
2022-11-25 18:52:46 +00:00
flexDirection: upSm ? "row" : "column",
2022-11-22 14:43:59 +00:00
flexWrap: "wrap",
2022-11-25 18:52:46 +00:00
gap: upMd ? "14px" : "20px",
2022-11-22 14:43:59 +00:00
}}
>
<PaymentMethodCard name="Mastercard" image={mastercardLogo} />
<PaymentMethodCard name="Visa" image={visaLogo} />
<PaymentMethodCard name="QIWI Кошелек" image={qiwiLogo} />
<PaymentMethodCard name="Мир" image={mirLogo} />
<PaymentMethodCard name="Тинькофф" image={tinkoffLogo} />
</Box>
<Box
sx={{
display: "flex",
flexDirection: "column",
justifyContent: "space-between",
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,
p: upMd ? "20px" : undefined,
pl: upMd ? "33px" : undefined,
mt: upMd ? undefined : "30px",
borderLeft: upMd ? `1px solid ${theme.palette.grey2.main}` : undefined,
2022-11-22 14:43:59 +00:00
}}
>
<Box
sx={{
display: "flex",
flexDirection: "column",
maxWidth: "85%",
}}
>
2022-11-25 18:52:46 +00:00
{upMd &&
<Typography mb="56px">
Выберите способ оплаты
</Typography>
}
2022-11-22 14:43:59 +00:00
<Typography mb="20px">
К оплате
</Typography>
<Typography
sx={{
fontWeight: 500,
fontSize: "20px",
lineHeight: "24px",
mb: "28px",
}}
>
3 190 руб.
</Typography>
</Box>
2022-11-22 21:44:42 +00:00
<CustomButton
2022-11-22 14:43:59 +00:00
variant="outlined"
sx={{
2022-11-24 19:22:30 +00:00
borderColor: theme.palette.brightPurple.main,
2022-11-22 14:43:59 +00:00
mt: "auto",
}}
2022-11-22 21:44:42 +00:00
>Выбрать</CustomButton>
2022-11-22 14:43:59 +00:00
</Box>
</Box>
</SectionWrapper>
);
}