frontAnswerer/lib/ui_kit/Stepper.tsx

38 lines
968 B
TypeScript
Raw Permalink Normal View History

2024-03-04 16:40:53 +00:00
import { useTheme } from "@mui/material";
import MobileStepper from "@mui/material/MobileStepper";
2024-03-05 11:53:30 +00:00
import { hexToRgba } from "@utils/hexToRgba";
2024-03-04 16:40:53 +00:00
interface Props {
activeStep: number;
steps: number;
}
export default function ProgressMobileStepper({ activeStep, steps }: Props) {
const theme = useTheme();
return (
<MobileStepper
variant="progress"
steps={steps + 1}
position="static"
activeStep={activeStep}
sx={{
width: "100%",
padding: "10px 0 0",
background: "transparent",
"& .MuiLinearProgress-root": {
height: "4px",
background: theme.palette.primary.light,
width: "100%",
},
2024-03-05 11:53:30 +00:00
"& .MuiLinearProgress-bar": { background: theme.palette.primary.main },
"& .MuiMobileStepper-progress": {
background: hexToRgba(theme.palette.primary.main, 0.5),
2024-03-04 16:40:53 +00:00
},
}}
nextButton={<></>}
backButton={<></>}
/>
);
}