import type { Ref, ReactElement } from 'react'; import type { ForwardRefForwardPropsComponent, BaseProps, NoChildrenProp } from '../../types'; export interface FileUploadItemProps extends BaseProps, NoChildrenProp { /** Name of the file. */ name: string; /** Id applied to upload item */ id?: string; /** File blob */ File?: File; /** A FileUploadVisual element to represent the file. */ visual?: ReactElement; /** Additional information about the file. If progress prop is passed and its value is less than 100, this region is instead used for the upload progress indicator. */ meta?: string | string[]; /** When passed, will render a single icon button for yet to be or in progress uploads. Use this action to trigger xhr request termination. */ onCancel?: (name: FileUploadItemProps['name']) => void; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. */ onEdit?: (name: FileUploadItemProps['name']) => void; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. */ onPreview?: (name: FileUploadItemProps['name']) => void; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. */ onDownload?: (name: FileUploadItemProps['name']) => void; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. */ onDelete?: (name: FileUploadItemProps['name']) => void; /** * Set if there is an error uploading or processing the file. Applies error styling to the meta string passed. * @default false */ error?: boolean; /** A string to be used as an image src for a attachment thumbnail. Falls back to a provided icon or the default attachment icon. */ thumbnail?: string; /** If the attachment is in an upload state, pass progress as a number between 0-100 representing the percentage of progress. */ progress?: number; /** The size of the file. */ size?: number; /** Determines if upload item will be disabled */ disabled?: boolean; /** A ref to the file item's HTMLLIElement. */ ref?: Ref; } /** * @deprecated * Deprecating in favour of new file components */ declare const FileUploadItem: ForwardRefForwardPropsComponent; export default FileUploadItem; //# sourceMappingURL=FileUploadItem.d.ts.map