fix: left sidebar style fixes (#3950)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-08-28 16:04:22 +00:00
committed by GitHub
co-authored by Alex Yang
parent e92d27549a
commit d62935935f
15 changed files with 235 additions and 99 deletions
@@ -24,7 +24,7 @@ import { type PropsWithChildren, useState } from 'react';
import { MemoryRouter } from 'react-router-dom';
export default {
title: 'Components/AppSidebar',
title: 'AFFiNE/AppSidebar',
component: AppSidebar,
} satisfies Meta;
@@ -0,0 +1,60 @@
import {
type AddPageButtonPureProps,
AppUpdaterButtonPure,
} from '@affine/component/app-sidebar';
import type { Meta, StoryFn } from '@storybook/react';
import type { PropsWithChildren } from 'react';
export default {
title: 'AFFiNE/AppUpdaterButton',
component: AppUpdaterButtonPure,
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta<typeof AppUpdaterButtonPure>;
const Container = ({ children }: PropsWithChildren) => (
<main
style={{
position: 'relative',
width: '320px',
display: 'flex',
flexDirection: 'row',
backgroundColor: '#eee',
padding: '16px',
}}
>
{children}
</main>
);
export const Default: StoryFn<AddPageButtonPureProps> = props => {
return (
<Container>
<AppUpdaterButtonPure {...props} />
</Container>
);
};
Default.args = {
appQuitting: false,
updateReady: true,
updateAvailable: {
version: '1.0.0-beta.1',
allowAutoUpdate: true,
},
downloadProgress: 42,
currentChangelogUnread: true,
};
export const Updated: StoryFn<AddPageButtonPureProps> = props => {
return (
<Container>
<AppUpdaterButtonPure {...props} updateAvailable={null} />
</Container>
);
};
Updated.args = {
currentChangelogUnread: true,
};