@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
56 lines (55 loc) • 1.35 kB
TypeScript
import React, { ReactNode } from 'react';
import { ListItemProps } from '@mui/material/ListItem';
import { UploadStatus } from '../models';
export interface FileItemProps extends Omit<ListItemProps, 'children'> {
/**
* File icon for list item
*/
icon: ReactNode;
/**
* File name for list item
*/
name: string;
/**
* File size for list item
*/
size: number;
/**
* if true, the size of the file will not be displayed.
* @default false
*/
hideSize?: boolean;
/**
* File uploading progress, 0-100 number value.
*/
progress?: number;
/**
* File status
*
* ```
* enum UploadStatus {
* Uploading = 'uploading',
* Failed = 'failed',
* Succeeded = 'succeeded',
* }
*
* ```
* @default UploadStatus.Succeeded
*/
status?: UploadStatus;
/**
* Error message when the upload is failed, optional value
* @default "Upload failed"
*/
errorMessage?: string;
/**
* Custom define actions
*/
actions?: ReactNode;
/**
* Retry callback when clicked the retry button
* @returns void
*/
onRetry?: React.MouseEventHandler<HTMLButtonElement>;
}
export declare const FileItem: (props: FileItemProps) => import("react/jsx-runtime").JSX.Element;