@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.
44 lines (43 loc) • 1.25 kB
TypeScript
import React, { ReactNode } from 'react';
import { BoxProps } from '@mui/material/Box';
import { UploadStatus } from '../models';
export interface FileStatusProps extends BoxProps {
/**
* File status
*
* ```
* enum UploadStatus {
* Uploading = 'uploading',
* Failed = 'failed',
* Succeeded = 'succeeded',
* }
*
* ```
*/
status: UploadStatus;
/**
* File uploading progress, 0-100 number value.
* @default 0
*/
progress?: number;
/**
* Error message when the upload is failed, optional value
* @default "Upload failed"
*/
errorMessage?: string;
/**
* Custom define actions, If user provided, the `onCancel` call back will be invalid.
*/
actions?: ReactNode;
/**
* Retry callback when clicked the retry button
* @returns void
*/
onRetry: React.MouseEventHandler<HTMLButtonElement>;
/**
* Cancel action callback when click the cancel icon, If `actions` is provided, this action won't take effect.
* @returns void
*/
onCancel?: React.MouseEventHandler<HTMLButtonElement>;
}
export declare const FileStatus: (props: FileStatusProps) => import("react/jsx-runtime").JSX.Element;