| 1 |
import React from "react"; |
| 2 |
import Dropzone from "../../"; |
| 3 |
|
| 4 |
export const dropzone = ( |
| 5 |
<Dropzone |
| 6 |
onDrop={(files) => console.log(files)} |
| 7 |
onFileDialogCancel={() => console.log("onFileDialogCancel invoked")} |
| 8 |
onFileDialogOpen={() => console.log("onFileDialogOpen invoked")} |
| 9 |
> |
| 10 |
{({ getRootProps, getInputProps, open }) => ( |
| 11 |
<div {...getRootProps()}> |
| 12 |
<input {...getInputProps()} /> |
| 13 |
<p>Drop some files here.</p> |
| 14 |
<button type="button" onClick={open}> |
| 15 |
Open file dialog |
| 16 |
</button> |
| 17 |
</div> |
| 18 |
)} |
| 19 |
</Dropzone> |
| 20 |
); |