UNPKG

react-images-upload

Version:

Simple component for upload and validate (client side) images with preview built with React.js. This package use [react-flip-move](https://github.com/joshwcomeau/react-flip-move) for animate the file preview images.

30 lines (28 loc) 687 B
import { Component } from 'react' interface Props { className?: string fileContainerStyle?: object onChange?: (files: File[]) => void buttonClassName?: string buttonStyles?: object withPreview?: boolean accept?: string name?: string withIcon?: boolean buttonText?: string withLabel?: boolean label?: string labelStyles?: object labelClass?: string imgExtension?: string[] maxFileSize?: number fileSizeError?: string fileTypeError?: string errorClass?: string errorStyle?: object singleImage?: boolean defaultImage?: string style?: object defaultImage?: string } export default class ReactImageUploadComponent extends Component<Props> { }