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} size="small" 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 },
34}));
35
36export default AssignButton;