From 439ef1ba90a06d69723c162f005bf41ea5ec0887 Mon Sep 17 00:00:00 2001 From: Qi <474021214@qq.com> Date: Fri, 21 Jul 2023 19:07:28 +0800 Subject: [PATCH] feat: refactor button with new design (#3343) --- .../affine/create-workspace-modal/index.tsx | 4 +- .../components/affine/language-menu/index.tsx | 2 +- .../delete-leave-workspace/delete/index.tsx | 2 +- .../delete-leave-workspace/leave/index.tsx | 2 +- .../new-workspace-setting-detail/export.tsx | 1 - .../new-workspace-setting-detail/profile.tsx | 3 +- .../new-workspace-setting-detail/publish.tsx | 4 +- .../new-workspace-setting-detail/storage.tsx | 4 +- .../general-setting/appearance/index.tsx | 8 +- .../header-right-items/editor-option-menu.tsx | 4 +- .../header-right-items/language-menu.tsx | 2 +- .../header-right-items/trash-button-group.tsx | 6 +- .../core/src/components/pure/footer/index.tsx | 3 +- .../components/pure/shortcuts-modal/index.tsx | 2 - apps/storybook/src/stories/button.stories.tsx | 9 +- .../src/stories/icon-button.stories.tsx | 25 ++ .../app-sidebar/sidebar-header/index.tsx | 2 - .../components/image-preview-modal/index.tsx | 29 +- .../page-list/components/favorite-tag.tsx | 7 +- .../components/page-list/operation-cell.tsx | 4 +- .../operation-menu-items/move-to-trash.tsx | 2 +- .../page-list/view/collection-list.tsx | 4 - .../page-list/view/create-collection.tsx | 9 +- .../share-menu/disable-public-link/index.tsx | 10 +- .../share-menu/disable-public-link/style.ts | 23 +- .../src/components/share-menu/share-menu.tsx | 9 +- .../src/components/share-menu/share-page.tsx | 22 +- .../components/share-menu/share-workspace.tsx | 10 +- .../src/components/share-menu/styles.ts | 42 +-- packages/component/src/ui/button/button.tsx | 166 ++++++--- .../component/src/ui/button/icon-button.tsx | 119 +++--- packages/component/src/ui/button/index.ts | 1 - packages/component/src/ui/button/style.css.ts | 349 ++++++++++++++++++ packages/component/src/ui/button/styles.ts | 116 ------ .../component/src/ui/button/text-button.tsx | 53 --- packages/component/src/ui/confirm/confirm.tsx | 6 +- packages/component/src/ui/loading/index.ts | 1 + packages/component/src/ui/loading/loading.tsx | 31 ++ .../component/src/ui/loading/styles.css.ts | 17 + .../component/src/ui/menu/menu-trigger.tsx | 9 +- plugins/copilot/src/UI/debug-content.tsx | 2 +- .../core/components/conversation/index.tsx | 14 +- 42 files changed, 665 insertions(+), 473 deletions(-) create mode 100644 apps/storybook/src/stories/icon-button.stories.tsx create mode 100644 packages/component/src/ui/button/style.css.ts delete mode 100644 packages/component/src/ui/button/text-button.tsx create mode 100644 packages/component/src/ui/loading/index.ts create mode 100644 packages/component/src/ui/loading/loading.tsx create mode 100644 packages/component/src/ui/loading/styles.css.ts diff --git a/apps/core/src/components/affine/create-workspace-modal/index.tsx b/apps/core/src/components/affine/create-workspace-modal/index.tsx index b4a6974e73..34712ec244 100644 --- a/apps/core/src/components/affine/create-workspace-modal/index.tsx +++ b/apps/core/src/components/affine/create-workspace-modal/index.tsx @@ -79,7 +79,7 @@ const NameWorkspaceContent = ({