From 238f69b4e7ba8b86ba4ca3fe759d5027e8afdd48 Mon Sep 17 00:00:00 2001 From: Fangdun Tsai Date: Thu, 4 May 2023 13:46:56 +0800 Subject: [PATCH] fix(component): click area of the item (#2221) Co-authored-by: Himself65 --- .../pure/workspace-slider-bar/shared-styles.ts | 7 ++++--- apps/web/src/components/root-app-sidebar/index.tsx | 13 +++++++++++-- .../component/src/components/changeLog/index.css.ts | 3 +-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/pure/workspace-slider-bar/shared-styles.ts b/apps/web/src/components/pure/workspace-slider-bar/shared-styles.ts index 53a864ab5ddff..28a7f268791d9 100644 --- a/apps/web/src/components/pure/workspace-slider-bar/shared-styles.ts +++ b/apps/web/src/components/pure/workspace-slider-bar/shared-styles.ts @@ -9,7 +9,7 @@ export const StyledListItem = styled('div')<{ color: active ? 'var(--affine-primary-color)' : 'var(--affine-text-primary-color)', - paddingLeft: '16px', + paddingLeft: '2px', paddingRight: '2px', borderRadius: '8px', cursor: 'pointer', @@ -17,7 +17,7 @@ export const StyledListItem = styled('div')<{ position: 'relative', flexShrink: 0, userSelect: 'none', - ...displayFlex('flex-start', 'center'), + ...displayFlex('flex-start', 'stretch'), ...(disabled ? { cursor: 'not-allowed', @@ -25,8 +25,9 @@ export const StyledListItem = styled('div')<{ } : {}), - '> svg, a > svg': { + 'a > svg, div > svg': { fontSize: '20px', + marginLeft: '14px', marginRight: '12px', color: active ? 'var(--affine-primary-color)' diff --git a/apps/web/src/components/root-app-sidebar/index.tsx b/apps/web/src/components/root-app-sidebar/index.tsx index 1d91086b95107..aa689b153f66c 100644 --- a/apps/web/src/components/root-app-sidebar/index.tsx +++ b/apps/web/src/components/root-app-sidebar/index.tsx @@ -105,8 +105,17 @@ export const RootAppSidebar = ({ onOpenQuickSearchModal(); }, [onOpenQuickSearchModal])} > - - {t['Quick search']()} +
+ + {t['Quick search']()} +