frontend/containers/WaitingList/AssignButton.tsx (view raw)
1import IconButton from '@mui/material/IconButton';
2import Icon from '@mui/material/Icon';
3import {useTranslation} from 'next-i18next';
4import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
5import theme from '../../theme';
6
7interface Props {
8 onClick: () => void;
9 tabIndex?: number;
10 disabled?: boolean;
11}
12
13const AssignButton = (props: Props) => {
14 const {onClick, tabIndex} = props;
15 const {t} = useTranslation();
16
17 return (
18 <ListItemSecondaryAction onClick={onClick} tabIndex={tabIndex}>
19 <IconButton
20 sx={{
21 borderRadius: 1,
22 fontSize: theme.typography.button,
23 padding: 0,
24 color: props.disabled ? 'black' : theme.palette.primary.main,
25 }}
26 disabled={props.disabled}
27 >
28 {t('passenger.actions.place')}
29 <Icon>chevron_right</Icon>
30 </IconButton>
31 </ListItemSecondaryAction>
32 );
33};
34
35export default AssignButton;