From ad4d65a591e483029122a287e89e045e42ef2d4a Mon Sep 17 00:00:00 2001 From: Sergei Ogorelkov Date: Wed, 1 Mar 2023 00:37:12 +0600 Subject: [PATCH] Update StepsDialog steps switching (#2692) Signed-off-by: Sergei Ogorelkov --- packages/ui/src/components/Component.svelte | 7 ++++-- packages/ui/src/components/StepsDialog.svelte | 25 ++++++++++--------- packages/ui/src/types.ts | 1 - 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/ui/src/components/Component.svelte b/packages/ui/src/components/Component.svelte index 5da4e00a39..11500b86bd 100644 --- a/packages/ui/src/components/Component.svelte +++ b/packages/ui/src/components/Component.svelte @@ -13,6 +13,7 @@ // limitations under the License. --> - {@const additionalStepInfo = currentStep?.additionalInfo} + {@const additionalStepInfo = currentStepModel?.additionalInfo}
@@ -122,8 +123,8 @@ - {@const stepName = currentStep?.name} - {@const stepDescription = currentStep?.description} + {@const stepName = currentStepModel?.name} + {@const stepDescription = currentStepModel?.description}
{#if stepName}

{/if} @@ -164,8 +165,8 @@ - {#if currentStep?.component} - {@const { component, props } = currentStep} + {#if currentStepModel?.component} + {@const { component, props } = currentStepModel} {@const isMobile = $deviceInfo.isMobile}
{#if typeof component === 'string'} - + {:else} - + {/if}
{/if} diff --git a/packages/ui/src/types.ts b/packages/ui/src/types.ts index d6ecb08d32..75bee0ea15 100644 --- a/packages/ui/src/types.ts +++ b/packages/ui/src/types.ts @@ -299,5 +299,4 @@ export interface DialogStep { readonly additionalInfo?: string readonly component: AnyComponent | AnySvelteComponent props?: Record - readonly onDone?: () => Promise | void }