diff --git a/packages/manager-react-components/src/components/container/step/Step.component.tsx b/packages/manager-react-components/src/components/container/step/Step.component.tsx index 8c179472842f..00d32b72b0ec 100644 --- a/packages/manager-react-components/src/components/container/step/Step.component.tsx +++ b/packages/manager-react-components/src/components/container/step/Step.component.tsx @@ -39,10 +39,11 @@ export type TStepProps = { label: string | JSX.Element; isDisabled?: boolean; }; - cancel?: { + skip?: { action: (id: string) => void; label: string | JSX.Element; isDisabled?: boolean; + hint?: string; }; children?: JSX.Element | JSX.Element[]; }; @@ -58,88 +59,94 @@ export const StepComponent = ({ children, next, edit, - cancel, -}: TStepProps): JSX.Element => { - return ( -
-
- {isChecked ? ( - - ) : ( + skip, +}: TStepProps): JSX.Element => ( +
+
+ {isChecked ? ( + + ) : ( +
+ + {order} + +
+ )} +
+
+
+
- + {skip?.hint &&
{skip.hint}
} +
+ {edit?.action && isLocked && ( +
+ { + if (!edit.isDisabled) { + edit.action(id); + } + }} > - {order} - + {edit.label} +
)}
-
-
+ {isOpen && ( + <> + {subtitle &&
{subtitle}
}
- {title} -
- {edit?.action && isLocked && ( -
- { - if (!edit.isDisabled) { - edit.action(id); - } - }} - > - {edit.label} - -
- )} -
- {isOpen && ( - <> - {subtitle &&
{subtitle}
} -
} > - } - > - {children} - -
- {!isLocked && (next || cancel) && ( -
- {next && ( + {children} + +
+ {!isLocked && ( +
+ {next?.action && ( +
{next.label} - )} - {cancel && ( +
+ )} + {skip?.action && ( +
{ - cancel.action(id); + skip.action(id); }} className="w-fit" - {...(cancel.isDisabled ? { disabled: true } : {})} + {...(skip.isDisabled ? { disabled: true } : {})} > - {cancel.label} + {skip.label} - )} -
- )} - - )} -
-
- ); -}; +
+ )} + + )} + + )} + +
+); export default StepComponent;