From f57aaf7e808de2a36716b96b4868202e861c1d4a Mon Sep 17 00:00:00 2001 From: DarkSky Date: Thu, 11 Aug 2022 22:31:38 +0800 Subject: [PATCH] feat: header switcher --- .../src/header/EditorBoardSwitcher/Switcher.tsx | 1 + libs/components/layout/src/header/LayoutHeader.tsx | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/components/layout/src/header/EditorBoardSwitcher/Switcher.tsx b/libs/components/layout/src/header/EditorBoardSwitcher/Switcher.tsx index 3c350c2379..d373850446 100644 --- a/libs/components/layout/src/header/EditorBoardSwitcher/Switcher.tsx +++ b/libs/components/layout/src/header/EditorBoardSwitcher/Switcher.tsx @@ -62,4 +62,5 @@ export const Switcher = () => { const StyledContainerForSwitcher = styled('div')({ display: 'flex', alignItems: 'center', + pointerEvents: 'all', }); diff --git a/libs/components/layout/src/header/LayoutHeader.tsx b/libs/components/layout/src/header/LayoutHeader.tsx index 85e715733b..604b6caa6d 100644 --- a/libs/components/layout/src/header/LayoutHeader.tsx +++ b/libs/components/layout/src/header/LayoutHeader.tsx @@ -147,9 +147,10 @@ const StyledLogoIcon = styled(LogoIcon)(({ theme }) => { }; }); -const StyledContainerForEditorBoardSwitcher = styled('div')(({ theme }) => { - return { - position: 'absolute', - left: '50%', - }; +const StyledContainerForEditorBoardSwitcher = styled('div')({ + width: '100%', + position: 'absolute', + display: 'flex', + justifyContent: 'center', + pointerEvents: 'none', });