UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

45 lines (44 loc) 1.63 kB
import React, { ReactNode } from 'react'; import { AttachmentFileProps } from 'choerodon-ui/dataset/configure'; import AttachmentFile from '../data-set/AttachmentFile'; import Record from '../data-set/Record'; import { AttachmentButtons, AttachmentListType } from './Attachment'; export interface AttachmentListProps { prefixCls: string; attachments?: AttachmentFile[]; listType?: AttachmentListType; pictureWidth: number; limit?: number; onUpload: (attachment: AttachmentFile) => void; onHistory?: (attachment: AttachmentFile, attachmentUUID: string) => void; onRemove: (attachment: AttachmentFile) => Promise<any> | undefined; onOrderChange: (props: { attachments: AttachmentFile[]; }) => void; onFetchAttachments: (props: { bucketName?: string; bucketDirectory?: string; storageCode?: string; attachmentUUID: string; isPublic?: boolean; }) => void; onAttachmentsChange: (attachments: AttachmentFile[] | undefined) => void; onPreview: () => void; previewTarget?: string; bucketName?: string; bucketDirectory?: string; storageCode?: string; attachmentUUID?: string; uploadButton?: ReactNode; sortable?: boolean; readOnly?: boolean; disabled?: boolean; showHistory?: boolean; showSize?: boolean; isPublic?: boolean; record?: Record; buttons?: AttachmentButtons[]; getPreviewUrl?: (props: AttachmentFileProps) => (string | (() => string | Promise<string>) | undefined); } declare const _default: React.FunctionComponent<AttachmentListProps>; export default _default;