Skip to content

Commit

Permalink
frontend: ReleaseNotes: Update stories to new component format
Browse files Browse the repository at this point in the history
Signed-off-by: René Dudfield <renedudfield@microsoft.com>
  • Loading branch information
illume committed Jul 15, 2024
1 parent 7972f60 commit 5cd7df5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
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',
},
};
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',
},
};

0 comments on commit 5cd7df5

Please sign in to comment.