all repos — caroster @ 1c1ffea0ece10964baaae8057366bb134fa53e54

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

app/src/containers/CarColumns/AddCar.js (view raw)

 1import React from 'react';
 2import Button from '@material-ui/core/Button';
 3import Container from '@material-ui/core/Container';
 4import {makeStyles} from '@material-ui/core';
 5import {useTranslation} from 'react-i18next';
 6
 7const AddCar = ({toggleNewCar}) => {
 8  const classes = useStyles();
 9  const {t} = useTranslation();
10  return (
11    <Container maxWidth="sm" className={classes.container}>
12      <Button
13        fullWidth
14        variant="contained"
15        color="primary"
16        onClick={toggleNewCar}
17        classes={{containedPrimary: classes.button}}
18      >
19        {t('car.creation.title')}
20      </Button>
21    </Container>
22  );
23};
24
25const useStyles = makeStyles(theme => ({
26  container: {
27    display: 'flex',
28    justifyContent: 'center',
29  },
30  button: {
31    backgroundColor: theme.palette.background.paper,
32    color: theme.palette.text.primary,
33    '&:hover': {color: theme.palette.primary.contrastText},
34  },
35}));
36
37export default AddCar;