Gazebo_simulation-Frontend/node_modules/react-dropzone/typings/tests/refs.tsx
2020-12-21 10:29:31 -05:00

19 lines
464 B
TypeScript

import React, {createRef} from "react";
import Dropzone, {DropzoneRef} from "../../";
const ref = createRef<DropzoneRef>()
export const dropzone = (
<Dropzone ref={ref}>
{({getRootProps, getInputProps}) => (
<div {...getRootProps()}>
<input {...getInputProps()} />
<p>Drop some files here.</p>
<button type="button" onClick={ref.current.open}>
Open file dialog
</button>
</div>
)}
</Dropzone>
);