Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3154 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3154 Rev 3259
Línea 2... Línea 2...
2
import { List as MuiList, ListItem as MuiListItem } from '@mui/material'
2
import { List as MuiList, ListItem as MuiListItem } from '@mui/material'
Línea 3... Línea 3...
3
 
3
 
Línea 4... Línea 4...
4
import EmptySection from '@components/UI/EmptySection'
4
import EmptySection from '@components/UI/EmptySection'
-
 
5
 
5
 
6
export default function List({
6
export default function List({
7
  elementsKey = 'id',
7
  items = [],
8
  items = [],
8
  emptyMessage = 'No hay elementos para mostrar',
9
  emptyMessage = 'No hay elementos para mostrar',
9
  renderItem = () => {}
10
  renderItem = () => {}
Línea 19... Línea 20...
19
        flexDirection: 'column',
20
        flexDirection: 'column',
20
        gap: ({ spacing }) => spacing(0.5)
21
        gap: ({ spacing }) => spacing(0.5)
21
      }}
22
      }}
22
    >
23
    >
23
      {items.map((item, index) => (
24
      {items.map((item, index) => (
24
        <MuiListItem key={item.id ?? index}>{renderItem(item)}</MuiListItem>
25
        <MuiListItem key={item[elementsKey] ?? index}>
-
 
26
          {renderItem(item)}
-
 
27
        </MuiListItem>
25
      ))}
28
      ))}
26
    </MuiList>
29
    </MuiList>
27
  )
30
  )
28
}
31
}