Gazebo_simulation-Frontend/node_modules/react-dropzone/typings/tests/hook.tsx

16 lines
360 B
TypeScript
Raw Normal View History

2020-12-21 11:29:31 -04:00
import React from "react";
import {useDropzone, DropzoneProps} from "../../";
export const Dropzone = ({children, ...opts}: DropzoneProps) => {
const {...state} = useDropzone(opts);
return children(state);
}
<Dropzone>
{({getRootProps, getInputProps}) => (
<div {...getRootProps()}>
<input {...getInputProps()} />
</div>
)}
</Dropzone>