choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
36 lines (35 loc) • 1.33 kB
TypeScript
import React from 'react';
import { DraggableProvided } from 'react-beautiful-dnd';
import { AttachmentFileProps } from 'choerodon-ui/dataset/configure';
import AttachmentFile from '../data-set/AttachmentFile';
import { AttachmentButtons, AttachmentListType } from './Attachment';
export declare const ATTACHMENT_TARGET = "attachment-preview";
export interface ItemProps {
attachment: AttachmentFile;
onUpload: (attachment: AttachmentFile) => void;
onHistory?: (attachment: AttachmentFile, attachmentUUID: string) => void;
onPreview?: () => void;
onRemove: (attachment: AttachmentFile) => Promise<any> | undefined;
readOnly?: boolean;
disabled?: boolean;
isCard?: boolean;
prefixCls?: string;
pictureWidth?: number;
restCount?: number;
index?: number;
listType?: AttachmentListType;
bucketName?: string;
bucketDirectory?: string;
storageCode?: string;
showSize?: boolean;
attachmentUUID?: string;
provided: DraggableProvided;
draggable?: boolean;
hidden?: boolean;
isPublic?: boolean;
previewTarget?: string;
buttons?: AttachmentButtons[];
getPreviewUrl?: (props: AttachmentFileProps) => (string | (() => string | Promise<string>) | undefined);
}
declare const _default: React.FunctionComponent<ItemProps>;
export default _default;