Skip to content

Commit

Permalink
JNG-5425 fix layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg committed Jan 17, 2024
1 parent cdd9b51 commit 157043a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<Grid container sx={ { height: DIVIDER_HEIGHT } } alignItems="center">
<Grid item xs={12}>
<Divider id="{{ getXMIID child }}">
{{# or child.icon child.label }}
<Box sx={ { display: 'flex', flexDirection: 'row', alignItems: 'center' } }>
{{/ or }}
{{# if child.icon }}
<MdiIcon path="{{ child.icon.iconName }}" {{# if child.label }}sx={ { mr: '.2rem' } }{{/ if }} />
{{/ if }}
Expand All @@ -23,7 +25,9 @@
{ t('{{ getTranslationKeyForVisualElement child }}', { defaultValue: '{{ child.label }}' }) as string }
</Typography>
{{/ if }}
{{# or child.icon child.label }}
</Box>
{{/ or }}
</Divider>
</Grid>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const NavCollapse = ({ menu, level, parentId }: NavCollapseProps) => {
{...(miniDrawer && { onMouseEnter: handleClick, onMouseLeave: handleClose })}
onClick={handleClick}
sx={ {
pl: !miniDrawer ? `${level * 24}px` : 1.5,
pl: !miniDrawer ? `${level * 1.5}rem` : 1.5,
py: miniDrawer && level === 1 ? 1.25 : 1,
'&:hover': {
bgcolor: miniDrawer ? 'transparent' : theme.palette.mode === ThemeMode.DARK ? 'divider' : 'primary.lighter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const NavItem = ({ item, level }: NavItemProps) => {
disabled={item.disabled}
sx={ {
zIndex: 1201,
pl: !miniDrawer ? `${level * iconWidth}px` : borderRadius,
pl: !miniDrawer ? `${level * 1.5}rem` : borderRadius,
py: miniDrawer && level === 1 ? 1.25 : 1,
'&:hover': {
bgcolor: theme.palette.mode === ThemeMode.DARK ? 'divider' : 'primary.lighter',
Expand Down

0 comments on commit 157043a

Please sign in to comment.