mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 05:27:30 +00:00
* Support Partial<> on setState now that TS 2.1 is out * Update readme to reflect setState being typed correctly * Switch setState to Pick * Restore cloneELement portion of readme * Use Pick<> | S for setState due to cast issue * state and props should be readonly * Fix nit + document why we * Add typescript compiler header * Update to properly order headers * Update readme to reflect 2.1.5 fixing stPick * Update readme now that 2.1.5 is out * All that depend on react now require 2.1 * Fix definition that fails due to readonly state
41 lines
1.7 KiB
TypeScript
41 lines
1.7 KiB
TypeScript
// Type definitions for react-dropzone
|
|
// Project: https://github.com/okonet/react-dropzone
|
|
// Definitions by: Mathieu Larouche Dube <https://github.com/matdube>, Ivo Jesus <https://github.com/LynxEyes>, Luís Rodrigues <https://github.com/goblindegook>
|
|
// Definitions: https://github.com/Vooban/DefinitelyTyped
|
|
// TypeScript Version: 2.1
|
|
/// <reference types="react"/>
|
|
|
|
declare module "react-dropzone" {
|
|
interface DropzoneProps {
|
|
// Drop behavior
|
|
onDrop?: Function,
|
|
onDropAccepted?: Function,
|
|
onDropRejected?: Function,
|
|
|
|
// Drag behavior
|
|
onDragStart?: Function,
|
|
onDragEnter?: Function,
|
|
onDragLeave?: Function,
|
|
|
|
style?: Object, // CSS styles to apply
|
|
activeStyle?: Object, // CSS styles to apply when drop will be accepted
|
|
rejectStyle?: Object, // CSS styles to apply when drop will be rejected
|
|
className?: string, // Optional className
|
|
activeClassName?: string, // className for accepted state
|
|
rejectClassName?: string, // className for rejected state
|
|
|
|
disablePreview?: boolean, // Enable/disable preview generation
|
|
disableClick?: boolean, // Disallow clicking on the dropzone container to open file dialog
|
|
|
|
inputProps?: Object, // Pass additional attributes to the <input type="file"/> tag
|
|
multiple?: boolean, // Allow dropping multiple files
|
|
accept?: string, // Allow specific types of files. See https://github.com/okonet/attr-accept for more information
|
|
name?: string, // name attribute for the input tag
|
|
maxSize?: number,
|
|
minSize?: number
|
|
}
|
|
|
|
let Dropzone: React.ClassicComponentClass<DropzoneProps>;
|
|
export = Dropzone;
|
|
}
|