From 26531bcef366381e12a5a85784c5196b65f38ac2 Mon Sep 17 00:00:00 2001 From: paola-p <> Date: Mon, 4 Dec 2023 15:04:51 +0100 Subject: [PATCH] fix(components/TotalLayout): rename TotalLayout property stepNumberForDraftSave to minStepNumberForDraftSave --- .../src/layout/TotalLayout/TotalLayout.js | 4 ++-- .../src/layout/TotalLayout/TotalLayout.stories.js | 3 +-- .../src/layout/TotalLayout/TotalLayoutFooter.js | 13 +++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/components/src/layout/TotalLayout/TotalLayout.js b/packages/components/src/layout/TotalLayout/TotalLayout.js index 3b3cb77c3..5627ed7ee 100644 --- a/packages/components/src/layout/TotalLayout/TotalLayout.js +++ b/packages/components/src/layout/TotalLayout/TotalLayout.js @@ -19,7 +19,7 @@ const TotalLayout = ({ stepsInfo, activeStep = 0, setActiveStep = () => {}, - stepNumberForDraftSave, + minStepNumberForDraftSave, onSave, footerActionsLabels, footerFinalActions, @@ -113,7 +113,7 @@ const TotalLayout = ({ onNext={() => validateAndAct(handleNext)} finalActions={finalActions} footerActionsLabels={footerActionsLabels} - stepNumberForDraftSave={stepNumberForDraftSave} + minStepNumberForDraftSave={minStepNumberForDraftSave} onSave={() => validateAndAct(onSave)} /> diff --git a/packages/components/src/layout/TotalLayout/TotalLayout.stories.js b/packages/components/src/layout/TotalLayout/TotalLayout.stories.js index 3811e61a3..dba7e581f 100644 --- a/packages/components/src/layout/TotalLayout/TotalLayout.stories.js +++ b/packages/components/src/layout/TotalLayout/TotalLayout.stories.js @@ -243,8 +243,7 @@ const Template = () => { Steps={Steps} footerActionsLabels={footerActionsLabels} footerFinalActions={footerFinalActions} - // Pass the index of the step from wich a draft can be save. Don't pass the prop when no save functionality is needed - stepNumberForDraftSave={1} + minStepNumberForDraftSave={1} onSave={handleOnSave} /> diff --git a/packages/components/src/layout/TotalLayout/TotalLayoutFooter.js b/packages/components/src/layout/TotalLayout/TotalLayoutFooter.js index 1c0190f2d..09a3ac14d 100644 --- a/packages/components/src/layout/TotalLayout/TotalLayoutFooter.js +++ b/packages/components/src/layout/TotalLayout/TotalLayoutFooter.js @@ -15,7 +15,7 @@ const TotalLayoutFooter = ({ onNext, finalActions, footerActionsLabels, - stepNumberForDraftSave, + minStepNumberForDraftSave, onSave, }) => { const { classes } = TotalLayoutFooterStyles( @@ -56,11 +56,12 @@ const TotalLayoutFooter = ({