Skip to content

Commit

Permalink
Merge pull request #952 from parlemonde/feat/responsive-map
Browse files Browse the repository at this point in the history
feat(#val-498):world-map
  • Loading branch information
guillaume-pages authored Jun 25, 2024
2 parents c8ba061 + 2069dbf commit fe6dd56
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/Base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Base = ({ children, rightNav, hideLeftNav = false, showSubHeader =
<SubHeaders />
</Box>
)}
<Box sx={{ marginTop: showSubHeader ? '0' : '70px' }} className="app-content__card with-shadow">
<Box sx={{ marginTop: showSubHeader ? '0' : '70px', padding: { xs: '0.25rem', sm: '0.5rem' } }} className="app-content__card with-shadow">
{children}
</Box>
{rightNav && (
Expand Down
15 changes: 11 additions & 4 deletions src/components/WorldMap/WorldMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ const WorldMap = () => {
<>
<Button
color="inherit"
sx={{
sx={(theme) => ({
[theme.breakpoints.only('xs')]: {
display: 'none',
},
color: (theme) => theme.palette.text.primary,
border: '1px solid #c5c5c5',
padding: '5px',
Expand All @@ -281,7 +284,7 @@ const WorldMap = () => {
'&:hover': {
backgroundColor: '#f5f5f5',
},
}}
})}
onClick={() => {
world.onZoom(-20);
}}
Expand All @@ -290,16 +293,20 @@ const WorldMap = () => {
</Button>
<Button
color="inherit"
sx={{
sx={(theme) => ({
[theme.breakpoints.only('xs')]: {
display: 'none',
},
color: (theme) => theme.palette.text.primary,
border: '1px solid #c5c5c5',
borderRadius: '0',
padding: '5px',
minWidth: 0,
backgroundColor: 'white',
'&:hover': {
backgroundColor: '#f5f5f5',
},
}}
})}
onClick={() => {
world.onZoom(20);
}}
Expand Down
7 changes: 5 additions & 2 deletions src/components/WorldMap/use-full-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export const useFullScreen = () => {
<Button
color="inherit"
variant="outlined"
sx={{
sx={(theme) => ({
[theme.breakpoints.only('xs')]: {
borderRadius: '12px !important',
},
color: (theme) => theme.palette.text.primary,
border: '1px solid #c5c5c5',
marginTop: '0.5rem',
Expand All @@ -39,7 +42,7 @@ export const useFullScreen = () => {
'&:hover': {
backgroundColor: '#f5f5f5',
},
}}
})}
onClick={toggleFullScreen}
>
{isFullScreen ? <FullscreenExitIcon /> : <FullscreenIcon />}
Expand Down

0 comments on commit fe6dd56

Please sign in to comment.