chore: update changelog link and remove obsolete changelog components (#2918)

This commit is contained in:
JimmFly
2023-06-29 18:19:26 +08:00
committed by GitHub
parent f76d8b8818
commit 7f00011542
6 changed files with 3 additions and 249 deletions

View File

@@ -1,47 +0,0 @@
import { ChangeLog } from '@affine/component/changeLog';
import type { StoryFn } from '@storybook/react';
import { within } from '@storybook/testing-library';
import { useState } from 'react';
export default {
title: 'AFFiNE/ChangeLog',
component: ChangeLog,
};
export const Default: StoryFn = () => (
<div
style={{
width: '256px',
height: '100vh',
}}
>
<ChangeLog onCloseWhatsNew={() => {}} />
</div>
);
export const Close: StoryFn = () => {
const [closed, setIsClosed] = useState(false);
return (
<>
<div>Closed: {closed ? 'true' : 'false'}</div>
<div
style={{
width: '256px',
height: '100vh',
}}
>
<ChangeLog
onCloseWhatsNew={() => {
setIsClosed(true);
}}
/>
</div>
</>
);
};
Close.play = async ({ canvasElement }) => {
const element = within(canvasElement);
await new Promise(resolve => setTimeout(resolve, 2000));
element.getByTestId('change-log-close-button').click();
};