From 31528babe8b50b0e7050e6333ca9c3f6e60d6313 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Thu, 8 Dec 2022 21:13:49 +0800 Subject: [PATCH] chore: update icons --- .../app/src/components/header/page-header.tsx | 17 ++++++++-- .../src/components/quick-search/footer.tsx | 31 ++----------------- .../app/src/components/quick-search/input.tsx | 22 +++---------- .../app/src/components/quick-search/style.ts | 2 +- 4 files changed, 23 insertions(+), 49 deletions(-) diff --git a/packages/app/src/components/header/page-header.tsx b/packages/app/src/components/header/page-header.tsx index 65dfa8e04a..4521dd122e 100644 --- a/packages/app/src/components/header/page-header.tsx +++ b/packages/app/src/components/header/page-header.tsx @@ -2,7 +2,9 @@ import React, { useEffect, useState } from 'react'; import { StyledTitle, StyledTitleWrapper } from './styles'; import { useEditor } from '@/providers/editor-provider'; import EditorModeSwitch from '@/components/editor-mode-switch'; - +import { MiddleIconArrowDownSmallIcon } from '@blocksuite/icons'; +import { useModal } from '@/providers/global-modal-provider'; +import IconButton from '@/ui/button/icon-button'; import Header from './header'; export const PageHeader = () => { @@ -10,7 +12,7 @@ export const PageHeader = () => { const [isHover, setIsHover] = useState(false); const { editor } = useEditor(); - + const { triggerQuickSearchModal } = useModal(); useEffect(() => { if (editor?.model) { setTitle(editor.model.title ?? ''); @@ -38,6 +40,17 @@ export const PageHeader = () => { }} /> {title} + + { + triggerQuickSearchModal(true); + }} + /> + ) : null} diff --git a/packages/app/src/components/quick-search/footer.tsx b/packages/app/src/components/quick-search/footer.tsx index 3ed233d29c..c4c4b13582 100644 --- a/packages/app/src/components/quick-search/footer.tsx +++ b/packages/app/src/components/quick-search/footer.tsx @@ -1,37 +1,12 @@ import React from 'react'; +import { MiddleAddIcon } from '@blocksuite/icons'; import { StyledModalFooterContent } from './style'; -const addIcon = ( - - - - - - - - -); - const QuickSearchFooter = () => { return ( - {addIcon} New page + + New page ); }; diff --git a/packages/app/src/components/quick-search/input.tsx b/packages/app/src/components/quick-search/input.tsx index a452db9e7d..bede221bbe 100644 --- a/packages/app/src/components/quick-search/input.tsx +++ b/packages/app/src/components/quick-search/input.tsx @@ -1,27 +1,13 @@ import React from 'react'; +import { MiddleSearchIcon } from '@blocksuite/icons'; import { StyledInput, StyledInputContent, StyledLabel } from './style'; -const searchIcon = ( - - - -); - const Input = () => { return ( - {searchIcon} + + + { - return { color: theme.colors.placeHolderColor, fontSize: theme.font.sm }; + return { color: theme.colors.placeHolderColor, fontSize: theme.font.xs }; }); export const StyledInput = styled('input')(({ theme }) => { return {