Skip to content
This repository was archived by the owner on May 19, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions src/components/organisms/Header/HeaderDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const useStyles = makeStyles((theme: Theme) => ({
// this height needs to be equal to the marginTop of PageTemplate
height: theme.spacing(globalConstants.headerHeight),
},
itemsEnd: {
alignItems: 'center',
},
}))

const HeaderDesktop: FC<HeaderProps> = ({
Expand All @@ -57,8 +60,7 @@ const HeaderDesktop: FC<HeaderProps> = ({
</Grid>
<Grid
item
xs={6}
xl={8}
xs={7}
container
justify="flex-start"
>
Expand All @@ -82,32 +84,24 @@ const HeaderDesktop: FC<HeaderProps> = ({
</Grid>
<Grid
item
xs={3}
xl={2}
xs={4}
container
justify="flex-end"
alignContent="center"
>
{
!!itemsEnd?.length
&& itemsEnd.map(({ icon, ...rest }: ActionHeaderItemProps) => (
<ListItemIcon key={icon.key} {...rest}>
<ListItemIcon
key={icon.key}
className={classes.itemsEnd}
{...rest}
>
{icon}
</ListItemIcon>
))
}
</Grid>
<Grid
item
container
xs={2}
xl={1}
justify="flex-end"
alignContent="center"
>
<div>
<Login />
</div>
<Login />
</Grid>
</Grid>
</Toolbar>
Expand Down
28 changes: 15 additions & 13 deletions src/components/organisms/Header/HeaderMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ const useStyles = makeStyles((theme: Theme) => createStyles({
mobileNavLinkActive: {
color: `${colors.primary} !important`,
},
itemsEnd: {
alignItems: 'center',
},
}))

const HeaderMobile: FC<HeaderProps> = ({
Expand Down Expand Up @@ -111,26 +114,25 @@ const HeaderMobile: FC<HeaderProps> = ({
</Grid>
<Grid
item
md={6}
sm={5}
xs={4}
xs={8}
container
justify="flex-end"
alignContent="center"
>
{
!!itemsEnd?.length
&& itemsEnd.map(({ icon, ...rest }: ActionHeaderItemProps) => (
<ListItemIcon key={icon.key} {...rest}>
{icon}
</ListItemIcon>
))
&& itemsEnd
.map(({ icon, ...rest }: ActionHeaderItemProps) => (
<ListItemIcon
key={icon.key}
className={classes.itemsEnd}
{...rest}
>
{icon}
</ListItemIcon>
))
}
</Grid>
<Grid item md={2} sm={3} xs={4} container justify="flex-end" alignContent="center">
<div>
<Login />
</div>
<Login />
</Grid>
</Grid>
)}
Expand Down