all repos — caroster @ v7.0

[Octree] Group carpool to your event https://caroster.io

frontend/containers/DrawerPassenger/DrawerPassengerHeader.tsx (view raw)

 1import {Box, IconButton, Icon, Typography} from '@mui/material';
 2import {useTranslation} from 'next-i18next';
 3
 4interface DrawerHeaderProps {
 5  isMobile: boolean;
 6  onClose: () => void;
 7}
 8
 9const DrawerHeader = ({isMobile, onClose}: DrawerHeaderProps) => {
10  const {t} = useTranslation();
11
12  return (
13    <Box>
14      {!isMobile && (
15        <Box
16          display="flex"
17          justifyContent="flex-end"
18          alignItems="flex-end"
19          paddingTop={2}
20        >
21          <IconButton
22            sx={{marginRight: 0}}
23            color="inherit"
24            edge="end"
25            aria-label="close"
26            onClick={onClose}
27            id="CloseBtn"
28          >
29            <Icon>close</Icon>
30          </IconButton>
31        </Box>
32      )}
33      <Box
34        display="flex"
35        alignItems="center"
36        justifyContent="space-between"
37        paddingBottom={2}
38      >
39        <Box display="flex" alignItems="center">
40          {isMobile && (
41            <IconButton
42              sx={{marginRight: 0}}
43              color="inherit"
44              edge="end"
45              aria-label="close"
46              onClick={onClose}
47              id="CloseBtn"
48            >
49              <Icon>chevron_left</Icon>
50            </IconButton>
51          )}
52          <Typography
53            variant="h3"
54            pl={2}
55          >{t`passenger.informations.title`}</Typography>
56        </Box>
57      </Box>
58    </Box>
59  );
60};
61
62export default DrawerHeader;