Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2278 | Rev 2282 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
2278 stevensc 1
import React from 'react'
2
import {
3
  Avatar,
4
  ListItemAvatar,
5
  ListItemText,
6
  List as MuiList,
7
  ListItem as MuiListItem
8
} from '@mui/material'
9
 
2280 stevensc 10
export function List({ children, styles, ...props }) {
11
  return (
12
    <MuiList sx={styles} {...props}>
13
      {children}
14
    </MuiList>
15
  )
2278 stevensc 16
}
17
 
18
export function ListItem({
19
  renderAction = () => null,
20
  title = '',
21
  subheader = '',
22
  avatarVariant = 'rounded',
23
  image = '',
24
  ...props
25
}) {
26
  return (
27
    <MuiListItem disableRipple secondaryAction={renderAction()} {...props}>
28
      {image ? (
29
        <ListItemAvatar>
2280 stevensc 30
          <Avatar
31
            src={image}
32
            alt={title}
33
            variant={avatarVariant}
34
            sx={{ width: 60, height: 60 }}
35
          />
2278 stevensc 36
        </ListItemAvatar>
37
      ) : null}
38
 
39
      <ListItemText primary={title} secondary={subheader} />
40
    </MuiListItem>
41
  )
42
}
2280 stevensc 43
 
44
List.Item = ListItem
45
 
46
export default List