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.

29 lines (27 loc) 681 B
import { Component } from 'react' interface Props { className?: string fileContainerStyle?: object onChange?: (files: File[],pictures:string[]) => 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 style?: object defaultImage?: string } export default class ReactImageUploadComponent extends Component<Props> { }