Skip to content

Commit

Permalink
Make InfoScreen button fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lubej committed Jun 28, 2023
1 parent 3cc7913 commit d1bae19
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions src/app/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,20 @@ const FooterStyled = styled(Box)(({ theme }) => ({
zIndex: zIndexHomePage.paraTimeSelector,
},
[theme.breakpoints.down('md')]: {
display: 'flex',
justifyContent: 'flex-end',
paddingRight: theme.spacing(2),
display: 'none',
},
}))

const InfoScreenBtn = styled(IconButton)(({ theme }) => ({
position: 'fixed',
right: theme.spacing(2),
bottom: theme.spacing(2),
zIndex: zIndexHomePage.paraTimeSelector,
}))

const Banners = styled(Box)(() => ({ theme }) => ({
[theme.breakpoints.down('md')]: {
position: 'absolute',
},
}))

Expand Down Expand Up @@ -171,15 +182,14 @@ export const HomePage: FC = () => {
</ThemeByNetwork>
</Content>

<FooterStyled>
{showInfoScreenBtn && (
<IconButton aria-label={infoAriaLabel} onClick={onToggleInfoScreenClick}>
<InfoOutlinedIcon fontSize="medium" sx={{ color: 'white' }} />
</IconButton>
)}
{!isMobile && <Footer />}
</FooterStyled>
<FooterStyled>{!isMobile && <Footer />}</FooterStyled>
</HomepageLayout>

{showInfoScreenBtn && (
<InfoScreenBtn aria-label={infoAriaLabel} onClick={onToggleInfoScreenClick}>
<InfoOutlinedIcon fontSize="medium" sx={{ color: 'white' }} />
</InfoScreenBtn>
)}
</>
)
}

0 comments on commit d1bae19

Please sign in to comment.