Skip to content

Commit

Permalink
Add wrapper component to Stepper
Browse files Browse the repository at this point in the history
  • Loading branch information
hervedombya committed Nov 8, 2023
1 parent 05a7565 commit 5e3cd6e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/lib/components/steppers/Stepper.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Subtract,
} from './types';
import { Steppers } from './Steppers.component';
import { Wrap } from '../../spacing';

const StepperContext = createContext<StepperContextType | null>(null);

Expand Down Expand Up @@ -63,15 +64,17 @@ export const Stepper = <T extends any[]>({

return (
<StepperContext.Provider value={{ next, prev }}>
<Steppers
activeStep={currentStep}
steps={steps.map((step) => {
return {
title: step.label,
};
})}
/>
<Component {...stepProps} />
<Wrap>
<Steppers
activeStep={currentStep}
steps={steps.map((step) => {
return {
title: step.label,
};
})}
/>
<Component {...stepProps} />
</Wrap>
</StepperContext.Provider>
);
};

0 comments on commit 5e3cd6e

Please sign in to comment.