Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3719 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3719 stevensc 1
import React from 'react';
2
import { Link } from 'react-router-dom';
3
import {
4
  Avatar,
5
  ListItem as MuiListItem,
6
  ListItemAvatar,
7
  ListItemButton,
8
  ListItemText
9
} from '@mui/material';
10
 
11
export const ListItem = ({ image, title, subtitle, url, onClick, renderAction }) => {
12
  return (
3736 stevensc 13
    <MuiListItem disablePadding disableRipple secondaryAction={renderAction && renderAction()}>
3719 stevensc 14
      <ListItemButton
15
        disableRipple
16
        onClick={onClick}
17
        LinkComponent={url ? Link : undefined}
18
        to={url || undefined}
19
      >
20
        <ListItemAvatar>
21
          <Avatar alt={`${title} image`} src={image} />
22
        </ListItemAvatar>
23
 
24
        <ListItemText primary={title} secondary={subtitle} />
25
      </ListItemButton>
26
    </MuiListItem>
27
  );
28
};