2023-03-01 22:59:51 +00:00
|
|
|
|
import * as React from 'react';
|
|
|
|
|
import MobileStepper from '@mui/material/MobileStepper';
|
|
|
|
|
import {Box, Typography} from "@mui/material";
|
2023-03-03 20:07:19 +00:00
|
|
|
|
interface Props {
|
|
|
|
|
desc?: string;
|
|
|
|
|
activeStep?: number;
|
|
|
|
|
steps?: number;
|
|
|
|
|
}
|
2023-01-22 14:02:27 +00:00
|
|
|
|
|
2023-06-27 22:26:23 +00:00
|
|
|
|
export default function ProgressMobileStepper({desc, activeStep = 0, steps = 6}:Props) {
|
2023-01-22 14:02:27 +00:00
|
|
|
|
|
2023-03-01 22:59:51 +00:00
|
|
|
|
return (
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
width: '100%',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
height: '51px',
|
|
|
|
|
borderRadius: '13px',
|
|
|
|
|
border: 'solid #7E2AEA 1px',
|
2023-03-03 23:54:19 +00:00
|
|
|
|
padding: '0 0 20px 0',
|
2023-03-01 22:59:51 +00:00
|
|
|
|
overflow: 'hidden'
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<MobileStepper
|
|
|
|
|
variant="progress"
|
2023-03-03 20:07:19 +00:00
|
|
|
|
steps={steps}
|
2023-03-01 22:59:51 +00:00
|
|
|
|
position="static"
|
|
|
|
|
activeStep={activeStep}
|
|
|
|
|
sx={{
|
|
|
|
|
width: '100%',
|
|
|
|
|
flexGrow: 1,
|
2023-03-03 23:54:19 +00:00
|
|
|
|
paddingLeft: 0,
|
2023-03-01 22:59:51 +00:00
|
|
|
|
'& .css-1ej0n1q-MuiLinearProgress-root-MuiMobileStepper-progress': {
|
|
|
|
|
height: '10px',
|
|
|
|
|
background: '#ffffff',
|
|
|
|
|
width: '100%'
|
|
|
|
|
},
|
|
|
|
|
'& .css-1v0msyf-MuiLinearProgress-bar1': {
|
|
|
|
|
background: '#7e2aea',
|
|
|
|
|
},
|
|
|
|
|
}}
|
2023-03-03 20:07:19 +00:00
|
|
|
|
nextButton={<></>}
|
|
|
|
|
backButton={<></>}
|
2023-03-01 22:59:51 +00:00
|
|
|
|
/>
|
2023-03-03 23:54:19 +00:00
|
|
|
|
<Box sx={{padding: '3px 3px 3px 20px'}}>
|
|
|
|
|
<Typography sx={{fontWeight:400,
|
|
|
|
|
fontSize: '12px',
|
2023-06-27 22:26:23 +00:00
|
|
|
|
lineHeight: '14.22px'}}> Шаг {activeStep + 1} из {steps}</Typography>
|
2023-03-10 01:38:31 +00:00
|
|
|
|
<Typography>{desc}</Typography>
|
2023-03-03 23:54:19 +00:00
|
|
|
|
</Box>
|
2023-03-01 22:59:51 +00:00
|
|
|
|
</Box>
|
2023-01-22 14:02:27 +00:00
|
|
|
|
);
|
2023-03-03 23:54:19 +00:00
|
|
|
|
}
|