From 562a60f68c79d7351f2ba4a33fd7ee870391d111 Mon Sep 17 00:00:00 2001 From: Richard Bangay Date: Mon, 8 Jul 2024 17:17:46 +0100 Subject: [PATCH 1/2] update progress stories to make it clear the difference between the old progressIndicator component and the newer progressStepper component --- .../mma/shared/ProgressIndicator.stories.tsx | 31 ------------------- .../mma/shared/ProgressStepper.stories.tsx | 30 ++++++++++++++++++ 2 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 client/components/mma/shared/ProgressStepper.stories.tsx diff --git a/client/components/mma/shared/ProgressIndicator.stories.tsx b/client/components/mma/shared/ProgressIndicator.stories.tsx index b6392d10a..1b1a1d540 100644 --- a/client/components/mma/shared/ProgressIndicator.stories.tsx +++ b/client/components/mma/shared/ProgressIndicator.stories.tsx @@ -10,37 +10,6 @@ export default { }, } as Meta; -export const Default: StoryFn = () => { - return ( - <> - - - - - - ); -}; - export const OldVersion: StoryFn = () => { return ( ; + +export const WithTitleWithCurrentStep: StoryObj = { + render: () => { + return ( + + ); + }, +}; + +export const WithoutTitleWithCurrentStep: StoryObj = { + render: () => { + return ; + }, +}; From 25ce833e0c229069b90f180310cc4dbc92cb5641 Mon Sep 17 00:00:00 2001 From: Richard Bangay Date: Mon, 8 Jul 2024 17:35:19 +0100 Subject: [PATCH 2/2] fix unnecessary references to progressStepper component inside the progressIndicator story --- .../mma/shared/ProgressIndicator.stories.tsx | 29 ++++++++++--------- .../mma/shared/ProgressIndicator.tsx | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/client/components/mma/shared/ProgressIndicator.stories.tsx b/client/components/mma/shared/ProgressIndicator.stories.tsx index 1b1a1d540..9a3109aea 100644 --- a/client/components/mma/shared/ProgressIndicator.stories.tsx +++ b/client/components/mma/shared/ProgressIndicator.stories.tsx @@ -1,23 +1,24 @@ -import type { Meta, StoryFn } from '@storybook/react'; +import type { Meta, StoryObj } from '@storybook/react'; import { ProgressIndicator } from './ProgressIndicator'; -import { ProgressStepper } from './ProgressStepper'; export default { title: 'Components/ProgressIndicator', - component: ProgressStepper, + component: ProgressIndicator, parameters: { layout: 'fullscreen', }, -} as Meta; +} as Meta; -export const OldVersion: StoryFn = () => { - return ( - - ); +export const OldVersion: StoryObj = { + render: () => { + return ( + + ); + }, }; diff --git a/client/components/mma/shared/ProgressIndicator.tsx b/client/components/mma/shared/ProgressIndicator.tsx index ad7df1215..e50b943b4 100644 --- a/client/components/mma/shared/ProgressIndicator.tsx +++ b/client/components/mma/shared/ProgressIndicator.tsx @@ -8,7 +8,7 @@ interface Step { isCurrentStep?: true; } -interface ProgressIndicatorProps { +export interface ProgressIndicatorProps { steps: [Step, Step, ...Step[]]; additionalCSS?: SerializedStyles; }