all repos — caroster @ e70dda0ec966d182cfaf626d43aea6888cdb7634

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

frontend/containers/WaitingList/AssignButton.tsx (view raw)

 1import IconButton from '@material-ui/core/IconButton';
 2import Icon from '@material-ui/core/Icon';
 3import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
 4import { makeStyles } from '@material-ui/core/styles';
 5import {useTranslation} from 'react-i18next';
 6
 7interface Props {
 8  onClick: () => void;
 9  tabIndex?: number;
10}
11
12const AssignButton = (props: Props) => {
13  const {onClick, tabIndex} = props;
14  const classes = useStyles();
15  const {t} = useTranslation();
16
17  return (
18    <ListItemSecondaryAction  className={classes.action} onClick={onClick} tabIndex={tabIndex}>
19      <IconButton className={classes.button} color="primary">
20        {t('passenger.actions.place')}
21        <Icon>chevron_right</Icon>
22      </IconButton>
23    </ListItemSecondaryAction>
24  );
25};
26
27const useStyles = makeStyles(theme => ({
28  action: {
29    top: theme.spacing(3),
30  },
31  button: {
32    borderRadius: theme.spacing(1),
33    margin: theme.spacing(1, 0, 0, 0),
34    padding: 0,
35    fontSize: '1rem',
36    lineHeight: 1.5,
37  },
38}));
39
40export default AssignButton;