-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: ReleaseNotes: Update stories to new component format
Signed-off-by: René Dudfield <renedudfield@microsoft.com>
- Loading branch information
Showing
2 changed files
with
26 additions
and
32 deletions.
There are no files selected for viewing
34 changes: 17 additions & 17 deletions
34
frontend/src/components/common/ReleaseNotes/ReleaseNotesModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
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', | ||
component: ReleaseNotesModal, | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
const Template: Story<ReleaseNotesModalProps> = args => <ReleaseNotesModal {...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', | ||
}, | ||
}; |
24 changes: 9 additions & 15 deletions
24
frontend/src/components/common/ReleaseNotes/UpdatePopup.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 => <UpdatePopup {...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', | ||
}, | ||
}; |