From 1eb388e112ba2bbd931df3d2408a91189e8a889d Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Tue, 14 Nov 2023 14:25:48 -0600 Subject: [PATCH] fix(webapp): fix language selector alignment --- webapp/src/components/Header/index.js | 36 +++++++++++---------- webapp/src/components/Header/styles.js | 45 +++++++++++++++----------- 2 files changed, 45 insertions(+), 36 deletions(-) diff --git a/webapp/src/components/Header/index.js b/webapp/src/components/Header/index.js index 2f517156..a9211208 100644 --- a/webapp/src/components/Header/index.js +++ b/webapp/src/components/Header/index.js @@ -79,26 +79,28 @@ const LanguageMenu = () => { })} onClick={closeMenu} > - - {languages.map(language => ( - - ))} - + + {languages.map(language => ( + + ))} + + ) } diff --git a/webapp/src/components/Header/styles.js b/webapp/src/components/Header/styles.js index 6679d704..f05a9dd5 100644 --- a/webapp/src/components/Header/styles.js +++ b/webapp/src/components/Header/styles.js @@ -149,27 +149,34 @@ export default (theme) => ({ color: theme.palette.primary.contrastText, }, }, - hideMenu: { - maxHeight: 0, - margin: 0, - zIndex: 2, - width: 50, - position: 'absolute', - padding: '0 !important', - transition: 'none !important', - overflow: 'hidden !important', - boxShadow: 'none !important', + hiddenlanguageMenu: { + width: 0, + height: 0, + '& > div': { + maxHeight: 0, + margin: 0, + zIndex: 2, + width: 0, + position: 'relative', + padding: '0 !important', + transition: 'none !important', + overflow: 'hidden !important', + boxShadow: 'none !important', + } }, languageMenu: { - maxHeight: 1000, - maxWidth: 50, - opacity: 1, - boxShadow: `${theme.palette.shadows.card} !important`, - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - top: 60, - left: 'calc(100% - 70px)' + '& > div': { + maxWidth: 50, + width: 50, + maxHeight: 1000, + opacity: 1, + top: 25, + left: 'calc(100% - 65px)', + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + boxShadow: `${theme.palette.shadows.card} !important` + } }, hideElement: { height: 0,