import React from 'react'; import {Stepper as MuiStepper, Step, StepLabel} from '@mui/material'; // import { useTheme } from '@mui/material/styles'; import {MuiStepConnector, MuiStepIconBasedRoot, MuiStepIconRoot} from './style'; interface IStep{ id: number, label: string } interface StepperProps{ steps: IStep[], children?: React.ReactNode, sx?: any, icons?: any, isIconStepper?: boolean, setActiveStep?: (step: number) => void, activeStep?: number, handleNext?: () => void, handleBack?: () => void, } const Stepper = ({steps = [], children, sx, icons,isIconStepper,setActiveStep = () => {}, activeStep,handleNext, handleBack, ...other} : StepperProps) => { // const theme = useTheme(); const handleStep = (step: number) => () => { setActiveStep(step); }; const StepIcon = (props: any) => { const { active, completed, className } = props; return (
{props.icon}
); } const MuiBasedStepIcon = (props: any) => { const { active, completed, className } = props; return ( {icons[props.icon]} ); } return <> }> {steps.map((step,index) => ( {step.label} ))} {children} } export default Stepper;