import React from "react"; import Dropzone from "../../"; export default class Accept extends React.Component { state = { accepted: [], rejected: [] }; render() { return ( { this.setState({ accepted, rejected }); }} > {({getRootProps}) => ( Try dropping some files here, or click to select files to upload. Only *.jpeg and *.png images will be accepted )} ); } } export const acceptExt = ( {({getRootProps, isDragActive, isDragAccept, isDragReject}) => ( {isDragAccept && "All files will be accepted"} {isDragReject && "Some files will be rejected"} {isDragActive && "Drop some files here ..."} )} ); export const acceptMime = ( {({getRootProps, isDragActive, isDragAccept, isDragReject}) => ( {isDragAccept && "All files will be accepted"} {isDragReject && "Some files will be rejected"} {isDragActive && "Drop some files here ..."} )} ); export const acceptArray = ( {({getRootProps, isDragActive, isDragAccept, isDragReject}) => ( {isDragAccept && "All files will be accepted"} {isDragReject && "Some files will be rejected"} {isDragActive && "Drop some files here ..."} )} );
Try dropping some files here, or click to select files to upload.
Only *.jpeg and *.png images will be accepted