Skip to content

Commit

Permalink
Merge pull request #676 from oasisprotocol/ml/reposition-help-screen-btn
Browse files Browse the repository at this point in the history
Reposition help screen button on mobile
  • Loading branch information
lubej authored Jul 7, 2023
2 parents f0d8cae + 82ecb3f commit cff688c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions .changelog/676.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reposition help screen button on mobile
2 changes: 1 addition & 1 deletion src/app/pages/HomePage/Graph/ParaTimeSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ParaTimeSelectorGlow = styled(Box, {
position: 'relative',
width: '130vw',
height: '130vw',
marginTop: '-10vh',
marginTop: '-5vh',
backgroundImage: `url("${
network === Network.testnet ? paratimeSelectorGlowTestnet : paratimeSelectorGlow
}")`,
Expand Down
17 changes: 8 additions & 9 deletions src/app/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const LogotypeBox = styled(Box)(({ theme }) => ({
const SearchInputContainer = styled(Box, {
shouldForwardProp: prop => prop !== 'transparent',
})<{ transparent: boolean }>(({ theme, transparent }) => ({
position: 'relative',
zIndex: zIndexHomePage.searchInput,
width: '100%',
[theme.breakpoints.up('md')]: {
Expand Down Expand Up @@ -113,9 +114,8 @@ const FooterStyled = styled(Box)(({ theme }) => ({
}))

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

Expand Down Expand Up @@ -162,6 +162,11 @@ export const HomePage: FC = () => {
<SearchInputBox>
<Search disabled={!isApiReachable} variant={searchVariant} onFocusChange={onFocusChange} />
</SearchInputBox>
{showInfoScreenBtn && (
<InfoScreenBtn aria-label={infoAriaLabel} onClick={onToggleInfoScreenClick}>
<InfoOutlinedIcon fontSize="medium" sx={{ color: 'white' }} />
</InfoScreenBtn>
)}
</SearchInputContainer>
<ThemeByNetwork network={network}>
<Box sx={{ zIndex: zIndexHomePage.paraTimeSelector }}>
Expand All @@ -182,12 +187,6 @@ export const HomePage: FC = () => {
</FooterStyled>
)}
</HomepageLayout>

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

0 comments on commit cff688c

Please sign in to comment.