Skip to content

Commit

Permalink
fix bad rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
gitdallas committed Oct 19, 2023
1 parent 692562f commit cb18398
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/react-core/src/components/Wizard/Wizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export interface WizardProps extends React.HTMLProps<HTMLDivElement> {
footer?: WizardFooterType;
/** Wizard navigation */
nav?: WizardNavType;
/** Aria-label for the Nav */
navAriaLabel?: string;
/** The initial index the wizard is to start on (1 or higher). Defaults to 1. */
startIndex?: number;
/** Additional classes spread to the wizard */
Expand Down Expand Up @@ -63,6 +65,7 @@ export const Wizard = ({
className,
header,
nav,
navAriaLabel,
startIndex = 1,
isVisitRequired = false,
isProgressive = false,
Expand Down Expand Up @@ -176,17 +179,23 @@ export const Wizard = ({
{...wrapperProps}
>
{header}
<WizardInternal nav={nav} isVisitRequired={isVisitRequired} isProgressive={isProgressive} />
<WizardInternal
nav={nav}
navAriaLabel={navAriaLabel}
isVisitRequired={isVisitRequired}
isProgressive={isProgressive}
/>
</div>
</WizardContextProvider>
);
};

const WizardInternal = ({
nav,
navAriaLabel,
isVisitRequired,
isProgressive
}: Pick<WizardProps, 'nav' | 'isVisitRequired' | 'isProgressive'>) => {
}: Pick<WizardProps, 'nav' | 'navAriaLabel' | 'isVisitRequired' | 'isProgressive'>) => {
const { activeStep, steps, footer, goToStepByIndex } = useWizardContext();
const [isNavExpanded, setIsNavExpanded] = React.useState(false);

Expand All @@ -198,12 +207,13 @@ const WizardInternal = ({
return (
<WizardNavInternal
nav={nav}
navAriaLabel={navAriaLabel}
isNavExpanded={isNavExpanded}
isVisitRequired={isVisitRequired}
isProgressive={isProgressive}
/>
);
}, [activeStep, isVisitRequired, isProgressive, goToStepByIndex, isNavExpanded, nav, steps]);
}, [activeStep, isVisitRequired, isProgressive, goToStepByIndex, isNavExpanded, nav, navAriaLabel, steps]);

return (
<WizardToggle
Expand Down

0 comments on commit cb18398

Please sign in to comment.