New state for Update Dialog

This commit is contained in:
Fedor Indutny 2023-03-15 09:57:27 -07:00 committed by GitHub
parent 5949cc11b1
commit a1ab62f878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 93 additions and 29 deletions

View file

@ -37,7 +37,7 @@ export function KnobsPlayground(): JSX.Element {
WidthBreakpoint,
WidthBreakpoint.Wide
);
const dialogType = select('dialogType', DialogType, DialogType.Update);
const dialogType = select('dialogType', DialogType, DialogType.AutoUpdate);
return (
<FakeLeftPaneContainer containerWidthBreakpoint={containerWidthBreakpoint}>
@ -57,7 +57,7 @@ export function UpdateWide(): JSX.Element {
<DialogUpdate
{...defaultProps}
containerWidthBreakpoint={WidthBreakpoint.Wide}
dialogType={DialogType.Update}
dialogType={DialogType.AutoUpdate}
currentVersion="5.24.0"
/>
</FakeLeftPaneContainer>
@ -68,6 +68,23 @@ UpdateWide.story = {
name: 'Update (Wide)',
};
export function DownloadedWide(): JSX.Element {
return (
<FakeLeftPaneContainer containerWidthBreakpoint={WidthBreakpoint.Wide}>
<DialogUpdate
{...defaultProps}
containerWidthBreakpoint={WidthBreakpoint.Wide}
dialogType={DialogType.DownloadedUpdate}
currentVersion="5.24.0"
/>
</FakeLeftPaneContainer>
);
}
DownloadedWide.story = {
name: 'Downloaded (Wide)',
};
export function DownloadReadyWide(): JSX.Element {
return (
<FakeLeftPaneContainer containerWidthBreakpoint={WidthBreakpoint.Wide}>
@ -248,7 +265,7 @@ export function UpdateNarrow(): JSX.Element {
<DialogUpdate
{...defaultProps}
containerWidthBreakpoint={WidthBreakpoint.Narrow}
dialogType={DialogType.Update}
dialogType={DialogType.AutoUpdate}
currentVersion="5.24.0"
/>
</FakeLeftPaneContainer>
@ -259,6 +276,23 @@ UpdateNarrow.story = {
name: 'Update (Narrow)',
};
export function DownloadedNarrow(): JSX.Element {
return (
<FakeLeftPaneContainer containerWidthBreakpoint={WidthBreakpoint.Narrow}>
<DialogUpdate
{...defaultProps}
containerWidthBreakpoint={WidthBreakpoint.Narrow}
dialogType={DialogType.DownloadedUpdate}
currentVersion="5.24.0"
/>
</FakeLeftPaneContainer>
);
}
DownloadedNarrow.story = {
name: 'Downloaded (Narrow)',
};
export function DownloadReadyNarrow(): JSX.Element {
return (
<FakeLeftPaneContainer containerWidthBreakpoint={WidthBreakpoint.Narrow}>