UNPKG

retro-react

Version:

A React component library for building retro-style websites

33 lines (32 loc) 1.19 kB
/// <reference types="react" /> import { ThemeUICSSObject } from 'theme-ui'; export declare type UploadColor = 'primary' | 'secondary' | 'success' | 'error' | 'warn' | 'greyscale' | 'greyscale-dark'; export interface DocumentUploadProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> { /** * The color of the DocumentUpload. * @default 'primary' */ color?: UploadColor; /** * The file types that the DocumentUpload accepts. * @example '.jpg,.png,.doc,.pdf' */ accept?: string; /** * Custom styles for the component. */ sx?: ThemeUICSSObject; /** * Callback function that is called when a file is selected or removed. */ onChange?: (file: File | null) => void; /** * Show retro loading animation when uploading */ isUploading?: boolean; } /** * A DocumentUpload component with authentic retro computing aesthetics, * complete with classic icons, sounds, and old-school UI elements. */ export declare const DocumentUpload: import("react").ForwardRefExoticComponent<DocumentUploadProps & import("react").RefAttributes<HTMLInputElement>>;