fix: show table head when no item in page list (#2642)

This commit is contained in:
Whitewater
2023-06-01 01:31:51 -07:00
committed by Himself65
parent fad00c242b
commit 2a31af0973
8 changed files with 183 additions and 416 deletions
@@ -9,6 +9,7 @@ import { PageList } from '../components/page-list/all-page';
import { NewPageButton } from '../components/page-list/components/new-page-buttton';
import type { OperationCellProps } from '../components/page-list/operation-cell';
import { OperationCell } from '../components/page-list/operation-cell';
import Empty from '../ui/empty/empty';
import { toast } from '../ui/toast';
export default {
@@ -128,6 +129,19 @@ AffineAllPageList.args = {
],
};
export const AffineEmptyAllPageList: StoryFn<typeof PageList> = ({
...props
}) => <PageList {...props} />;
AffineEmptyAllPageList.args = {
isPublicWorkspace: false,
onCreateNewPage: () => toast('Create new page'),
onCreateNewEdgeless: () => toast('Create new edgeless'),
onImportFile: () => toast('Import file'),
list: [],
fallback: <Empty description="empty description" />,
};
export const AffinePublicPageList: StoryFn<typeof PageList> = ({
...props
}) => <PageList {...props} />;