Files
GNX-mailEnterprise/frontend/node_modules/react-dropzone/typings/tests/refs.tsx
Iliyan Angelov c67067a2a4 Mail
2025-09-14 23:24:25 +03:00

19 lines
471 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>
);