feat: replace button from @toeverything/components (#3608)

This commit is contained in:
Qi
2023-08-08 12:38:02 +08:00
committed by GitHub
parent 7826ecfa58
commit 6efe29f7ef
60 changed files with 112 additions and 500 deletions
@@ -1,5 +1,5 @@
// fixme(himself65): refactor this file
import { FlexWrapper, IconButton, Menu, MenuItem } from '@affine/component';
import { FlexWrapper, Menu, MenuItem } from '@affine/component';
import { Export, MoveToTrash } from '@affine/component/page-list';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { assertExists } from '@blocksuite/global/utils';
@@ -10,6 +10,7 @@ import {
MoreVerticalIcon,
PageIcon,
} from '@blocksuite/icons';
import { IconButton } from '@toeverything/components/button';
import {
useBlockSuitePageMeta,
usePageMetaHelper,
@@ -23,8 +24,8 @@ import { pageSettingFamily } from '../../../../atoms';
import { useBlockSuiteMetaHelper } from '../../../../hooks/affine/use-block-suite-meta-helper';
import { useCurrentWorkspace } from '../../../../hooks/current/use-current-workspace';
import { toast } from '../../../../utils';
import { MenuThemeModeSwitch } from '../header-right-items/theme-mode-switch';
import { LanguageMenu } from './language-menu';
import { MenuThemeModeSwitch } from './theme-mode-switch';
const CommonMenu = () => {
const content = (
<div
@@ -1,7 +1,8 @@
import { Button, displayFlex, Menu, MenuItem, styled } from '@affine/component';
import { displayFlex, Menu, MenuItem, styled } from '@affine/component';
import { LOCALES } from '@affine/i18n';
import { useI18N } from '@affine/i18n';
import { ArrowDownSmallIcon, LanguageIcon } from '@blocksuite/icons';
import { Button } from '@toeverything/components/button';
import type { FC, ReactElement } from 'react';
import { useCallback } from 'react';
@@ -1,7 +1,8 @@
import { Button, Confirm } from '@affine/component';
import { Confirm } from '@affine/component';
import { WorkspaceSubPath } from '@affine/env/workspace';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { assertExists } from '@blocksuite/global/utils';
import { Button } from '@toeverything/components/button';
import { useBlockSuitePageMeta } from '@toeverything/hooks/use-block-suite-page-meta';
import { currentPageIdAtom } from '@toeverything/infra/atom';
import { useAtomValue } from 'jotai';
@@ -1,5 +1,5 @@
import { Button } from '@affine/component';
import { assertExists } from '@blocksuite/global/utils';
import { Button } from '@toeverything/components/button';
import {
useBlockSuitePageMeta,
usePageMetaHelper,