refactor(core): favorite adapter (#6285)

1. abstraction over favourites that supports different type of resources
2. sorting abstraction
This commit is contained in:
pengx17
2024-03-29 04:04:07 +00:00
parent 296362ced1
commit 5490944d04
26 changed files with 450 additions and 213 deletions
@@ -43,11 +43,12 @@ export const AffineOperationCell: StoryFn<PageOperationCellProps> = ({
}) => <PageOperationCell {...props} />;
AffineOperationCell.args = {
favorite: false,
isPublic: true,
onToggleFavoritePage: () => toast('Toggle favorite page'),
onDisablePublicSharing: () => toast('Disable public sharing'),
onRemoveToTrash: () => toast('Remove to trash'),
page: {
id: '123',
title: 'Test Page Title',
tags: ['tag1', 'tag2'],
createDate: new Date('2021-01-01').getTime(),
},
};
AffineOperationCell.parameters = {
reactRouter: reactRouterParameters({