frontend/containers/MapActions/index.tsx (view raw)
1import {Box, Paper, useMediaQuery} from '@mui/material';
2import SearchField from './SearchField';
3import {useTheme} from '@mui/styles';
4
5type Props = {};
6
7const MapActions = (props: Props) => {
8 const theme = useTheme();
9 const isMobile = useMediaQuery(theme.breakpoints.down('md'));
10 return (
11 <Box
12 id="map-actions"
13 zIndex={400}
14 position="absolute"
15 top={isMobile ? 95 : 64}
16 left={isMobile ? 0 : 25}
17 right={isMobile ? 0 : 25}
18 >
19 <Box component={Paper} p={1} width={isMobile ? '100%' : 350}>
20 <SearchField />
21 </Box>
22 </Box>
23 );
24};
25
26export default MapActions;