From 3282344d4a2931c61642b224ed143bad1707e233 Mon Sep 17 00:00:00 2001 From: Pratik Kumar Date: Thu, 3 Aug 2023 14:08:00 +0530 Subject: [PATCH] fix: padding in the Switch button of Page/Edgeless (#3542) --- .../workspace-header/editor-mode-switch/style.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/core/src/components/blocksuite/workspace-header/editor-mode-switch/style.ts b/apps/core/src/components/blocksuite/workspace-header/editor-mode-switch/style.ts index 764ffe4705..75ea1e17c2 100644 --- a/apps/core/src/components/blocksuite/workspace-header/editor-mode-switch/style.ts +++ b/apps/core/src/components/blocksuite/workspace-header/editor-mode-switch/style.ts @@ -5,14 +5,15 @@ export const StyledEditorModeSwitch = styled('div')<{ showAlone?: boolean; }>(({ switchLeft, showAlone }) => { return { - width: showAlone ? '40px' : '78px', + maxWidth: showAlone ? '40px' : '70px', + gap: '8px', height: '32px', background: showAlone ? 'transparent' : 'var(--affine-background-secondary-color)', borderRadius: '12px', ...displayFlex('space-between', 'center'), - padding: '0 8px', + padding: '4px 4px', position: 'relative', '::after': { @@ -25,7 +26,7 @@ export const StyledEditorModeSwitch = styled('div')<{ borderRadius: '8px', zIndex: 1, position: 'absolute', - transform: `translateX(${switchLeft ? '0' : '38px'})`, + transform: `translateX(${switchLeft ? '0' : '32px'})`, transition: 'all .15s', }, };