UNPKG

@i-novus/ui-core

Version:

Базовые UI компоненты

13 lines (12 loc) 719 B
import { jsx as _jsx } from "react/jsx-runtime"; import classNames from 'classnames'; import { useConfigProvider } from '../../core'; import { FileItem } from './FileItem'; export const FileList = ({ files, onCancelLoad, onRemove, className, visible = true, children, prefix, style, readOnly = false }) => { const { getPrefix } = useConfigProvider(); const prefixCls = getPrefix(prefix); if (!visible) { return null; } return (_jsx("div", { className: classNames(`${prefixCls}-file-list`, className), style: style, children: children || files?.map(file => (_jsx(FileItem, { file: file, prefix: prefix, onCancelLoad: onCancelLoad, onRemove: onRemove, readOnly: readOnly }, file.id))) })); };