| 1 |
import React from "react"; |
| 2 |
import Dropzone from "../../"; |
| 3 |
|
| 4 |
export class Events extends React.Component { |
| 5 |
render() { |
| 6 |
return ( |
| 7 |
<section> |
| 8 |
<div className="dropzone"> |
| 9 |
<Dropzone |
| 10 |
onDrop={(acceptedFiles, fileRejections, event) => |
| 11 |
console.log(acceptedFiles, fileRejections, event) |
| 12 |
} |
| 13 |
onDragEnter={(event) => console.log(event)} |
| 14 |
onDragOver={(event) => console.log(event)} |
| 15 |
onDragLeave={(event) => console.log(event)} |
| 16 |
> |
| 17 |
{({ getRootProps, getInputProps }) => ( |
| 18 |
<div {...getRootProps()}> |
| 19 |
<input {...getInputProps()} /> |
| 20 |
<p> |
| 21 |
Try dropping some files here, or click to select files to |
| 22 |
upload. |
| 23 |
</p> |
| 24 |
</div> |
| 25 |
)} |
| 26 |
</Dropzone> |
| 27 |
</div> |
| 28 |
</section> |
| 29 |
); |
| 30 |
} |
| 31 |
} |