Skip to content

Commit

Permalink
fix(Wizard): fix missing provider prop (#3875)
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Jun 12, 2023
1 parent 42e769c commit 6b34b90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Wizard/WizardStep.tsx
Expand Up @@ -153,7 +153,7 @@ const WizardStep = ({ dataTest, title, onClick }: WizardStepProps) => {
isLastStep,
} = React.useContext(WizardStepContext);

const handleClick = event => {
const handleClick = <T extends React.SyntheticEvent<HTMLElement>>(event: T) => {
if (onClick) onClick(event);
if (onChangeStep) onChangeStep(index);
onClose();
Expand Down
4 changes: 2 additions & 2 deletions packages/orbit-components/src/Wizard/index.tsx
Expand Up @@ -62,7 +62,7 @@ const Wizard = ({
return "disabled";
});

const activeStepTitle = childrenArray.find((step, index) => index === activeStep)?.props.title;
const activeStepTitle = childrenArray.find((_, index) => index === activeStep)?.props.title;
const stepsCount = React.Children.count(children);

const steps = React.Children.map(children, (step, index) => (
Expand All @@ -72,7 +72,7 @@ const Wizard = ({
isLastStep={index === stepsCount - 1}
isColumnOnDesktop={direction === "column"}
nextStepStatus={stepStatuses[index + 1]}
isCompact
isCompact={isCompact}
isActive={activeStep === index}
onChangeStep={onChangeStep}
onClose={() => setOpen(false)}
Expand Down

0 comments on commit 6b34b90

Please sign in to comment.