芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/@buffetjs/core/src/components/List/index.js
/** * * List * */ import React from 'react'; import PropTypes from 'prop-types'; import { List as StyledList, LoadingIndicator } from '@buffetjs/styles'; import ListRow from '../ListRow'; import Padded from '../Padded'; function List({ className, items, isLoading, customRowComponent }) { return (
{isLoading ? (
) : (
{items.map((item, index) => customRowComponent ? ( // eslint-disable-next-line react/no-array-index-key
{customRowComponent(item)}
) : ( // eslint-disable-next-line react/no-array-index-key
) )}
)}
); } List.defaultProps = { className: null, customRowComponent: null, isLoading: false, items: [], }; List.propTypes = { className: PropTypes.string, customRowComponent: PropTypes.func, isLoading: PropTypes.bool, items: PropTypes.instanceOf(Array), }; export default List;