From 5cd7df5024e52492322553ccfa182ddac5920c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= Date: Mon, 15 Jul 2024 16:43:38 +0200 Subject: [PATCH] frontend: ReleaseNotes: Update stories to new component format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: René Dudfield --- .../ReleaseNotesModal.stories.tsx | 34 +++++++++---------- .../ReleaseNotes/UpdatePopup.stories.tsx | 24 +++++-------- 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/common/ReleaseNotes/ReleaseNotesModal.stories.tsx b/frontend/src/components/common/ReleaseNotes/ReleaseNotesModal.stories.tsx index e561b042528..d16fe8f60cc 100644 --- a/frontend/src/components/common/ReleaseNotes/ReleaseNotesModal.stories.tsx +++ b/frontend/src/components/common/ReleaseNotes/ReleaseNotesModal.stories.tsx @@ -1,6 +1,5 @@ -import { Meta, Story } from '@storybook/react'; -import React from 'react'; -import ReleaseNotesModal, { ReleaseNotesModalProps } from './ReleaseNotesModal'; +import { Meta } from '@storybook/react'; +import ReleaseNotesModal from './ReleaseNotesModal'; export default { title: 'common/ReleaseNotes/ReleaseNotesModal', @@ -8,22 +7,23 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; - -export const Show = Template.bind({}); -Show.args = { - releaseNotes: '### Hello\n\nworld', - appVersion: '1.9.9', +export const Show = { + args: { + releaseNotes: '### Hello\n\nworld', + appVersion: '1.9.9', + }, }; -export const Closed = Template.bind({}); -Closed.args = { - releaseNotes: undefined, - appVersion: null, +export const Closed = { + args: { + releaseNotes: undefined, + appVersion: null, + }, }; -export const ShowNoNotes = Template.bind({}); -ShowNoNotes.args = { - releaseNotes: undefined, - appVersion: '1.8.8', +export const ShowNoNotes = { + args: { + releaseNotes: undefined, + appVersion: '1.8.8', + }, }; diff --git a/frontend/src/components/common/ReleaseNotes/UpdatePopup.stories.tsx b/frontend/src/components/common/ReleaseNotes/UpdatePopup.stories.tsx index 97447c0079d..e4c3ff7938c 100644 --- a/frontend/src/components/common/ReleaseNotes/UpdatePopup.stories.tsx +++ b/frontend/src/components/common/ReleaseNotes/UpdatePopup.stories.tsx @@ -1,25 +1,19 @@ -import { Meta, Story } from '@storybook/react'; import UpdatePopup from './UpdatePopup'; export default { title: 'common/ReleaseNotes/UpdatePopup', component: UpdatePopup, argTypes: {}, -} as Meta; - -const Template: Story<{ - releaseDownloadURL?: string | null; - fetchingRelease?: boolean; - releaseFetchFailed?: boolean; - skipUpdateHandler: () => void; -}> = args => ; +}; -export const Show = Template.bind({}); -Show.args = { - releaseDownloadURL: 'https://example.com', +export const Show = { + args: { + releaseDownloadURL: 'https://example.com', + }, }; -export const Closed = Template.bind({}); -Closed.args = { - releaseDownloadURL: 'https://example.com', +export const Closed = { + args: { + releaseDownloadURL: 'https://example.com', + }, };