2023-09-15 12:37:12 +00:00
|
|
|
|
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material";
|
2023-11-13 18:04:51 +00:00
|
|
|
|
import MobileStepper from "@mui/material/MobileStepper";
|
2023-11-27 23:07:24 +00:00
|
|
|
|
import { maxQuizSetupSteps, quizSetupSteps } from "@model/quizSettings";
|
2023-11-13 18:04:51 +00:00
|
|
|
|
|
2023-03-03 20:07:19 +00:00
|
|
|
|
interface Props {
|
2023-11-27 23:07:24 +00:00
|
|
|
|
activeStep: number;
|
2023-03-03 20:07:19 +00:00
|
|
|
|
}
|
2023-01-22 14:02:27 +00:00
|
|
|
|
|
2023-10-30 16:46:02 +00:00
|
|
|
|
export default function ProgressMobileStepper({
|
2023-11-20 17:22:13 +00:00
|
|
|
|
activeStep,
|
2023-10-30 16:46:02 +00:00
|
|
|
|
}: Props) {
|
2023-11-20 17:22:13 +00:00
|
|
|
|
const theme = useTheme();
|
|
|
|
|
const isTablet = useMediaQuery(theme.breakpoints.down(1000));
|
2023-01-22 14:02:27 +00:00
|
|
|
|
|
2023-11-20 17:22:13 +00:00
|
|
|
|
return (
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
maxWidth: isTablet ? "800px" : "100%",
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: "center",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
height: "73px",
|
|
|
|
|
borderRadius: "13px",
|
|
|
|
|
border: "solid #7E2AEA 1px",
|
|
|
|
|
padding: "0 0 20px 0",
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
}}
|
2023-10-30 16:46:02 +00:00
|
|
|
|
>
|
2023-11-20 17:22:13 +00:00
|
|
|
|
<MobileStepper
|
|
|
|
|
variant="progress"
|
2023-11-27 23:07:24 +00:00
|
|
|
|
steps={maxQuizSetupSteps}
|
2023-11-20 17:22:13 +00:00
|
|
|
|
position="static"
|
2023-11-27 23:07:24 +00:00
|
|
|
|
activeStep={activeStep}
|
2023-11-20 17:22:13 +00:00
|
|
|
|
sx={{
|
|
|
|
|
width: "100%",
|
|
|
|
|
flexGrow: 1,
|
|
|
|
|
padding: "8px 0",
|
2023-12-29 14:04:42 +00:00
|
|
|
|
"& .MuiLinearProgress-root": {
|
2023-11-20 17:22:13 +00:00
|
|
|
|
height: "10px",
|
|
|
|
|
background: "#ffffff",
|
|
|
|
|
width: "100%",
|
|
|
|
|
},
|
2023-12-29 14:04:42 +00:00
|
|
|
|
"& .MuiLinearProgress-bar": {
|
2023-11-20 17:22:13 +00:00
|
|
|
|
background: "#7e2aea",
|
|
|
|
|
},
|
|
|
|
|
}}
|
|
|
|
|
nextButton={<></>}
|
|
|
|
|
backButton={<></>}
|
|
|
|
|
/>
|
|
|
|
|
<Box sx={{ padding: "3px 3px 3px 20px" }}>
|
|
|
|
|
<Typography
|
|
|
|
|
sx={{ fontWeight: 400, fontSize: "12px", lineHeight: "14.22px" }}
|
|
|
|
|
>
|
|
|
|
|
{" "}
|
2023-11-27 23:07:24 +00:00
|
|
|
|
Шаг {activeStep + 1 } из {maxQuizSetupSteps}
|
2023-11-20 17:22:13 +00:00
|
|
|
|
</Typography>
|
2023-11-27 23:07:24 +00:00
|
|
|
|
<Typography>{quizSetupSteps[activeStep].stepperText}</Typography>
|
2023-11-20 17:22:13 +00:00
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
);
|
2023-09-15 12:37:12 +00:00
|
|
|
|
}
|