How to use the react-dropzone.default function in react-dropzone

To help you get started, we’ve selected a few react-dropzone examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SUI-Components / sui-components / components / atom / upload / src / index.js View on Github external
require => {
        const Dropzone = require('react-dropzone').default
        this.setState({Dropzone})
      },
      'react-dropzone'
github curefit / react-crux / src / components / ImageUploadComponent.tsx View on Github external
import autobind from "autobind-decorator"
import * as React from "react"
import * as upload from "superagent"
import { InlineComponentProps } from "../CruxComponent"
let Dropzone = require("react-dropzone")
if ("default" in Dropzone) {
    Dropzone = Dropzone.default
}

@autobind
export class ImageUploadComponent extends React.Component {
    constructor(props: any) {
        super(props)
        this.state = {
            inProgress: false
        }
    }

    onDrop(files: any, width: string, height: string, contentType: string) {
        const formData = new FormData()
        formData.append("images", files[0])
        if (width) {
            formData.append("width", width)

react-dropzone

Simple HTML5 drag-drop zone with React.js

MIT
Latest version published 4 days ago

Package Health Score

97 / 100
Full package analysis