forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact-dropzone.d.ts
47 lines (41 loc) · 1.35 KB
/
react-dropzone.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Type definitions for react-dropzone
// Project: https://github.com/paramaggarwal/react-dropzone
// Definitions by: Mathieu Larouche Dube <https://github.com/matdube>
// Definitions: https://github.com/Vooban/DefinitelyTyped
///<reference path='../react/react.d.ts' />
declare namespace ReactDropzone {
import React = __React;
interface DropzoneProps {
onDrop?: Function;
onDropAccepted?: Function;
onDropRejected?: Function;
onDragEnter?: Function;
onDragLeave?: Function;
style?: Object;
activeStyle?: Object;
className?: string;
activeClassName?: string;
rejectClassName?: string;
/**
* Clicking the <Dropzone> brings up the browser file picker. To disable, set to true.
*/
disableClick?: boolean;
/**
* To accept only a single file, set this to false.
*/
multiple?: boolean;
/**
* Filters the file types that are valid. It should have a valid MIME type according to input element, for example:
* application/pdf
* image/*
* audio/aiff,audio/midi
*/
accept?: string;
}
export class Dropzone extends React.Component<DropzoneProps, {}> {
}
}
declare module "react-dropzone" {
const Dropzone: typeof ReactDropzone.Dropzone;
export = Dropzone;
}