File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import type { ReactElement, ReactNode } from "react";
2
2
import cn from "classnames" ;
3
3
import { fireEvent , render } from "@testing-library/react" ;
4
4
5
- import type { DropzoneHanders } from "../useDropzone" ;
5
+ import type { DropzoneHandlers } from "../useDropzone" ;
6
6
import { useDropzone } from "../useDropzone" ;
7
7
8
8
function Test ( {
9
9
children,
10
10
...options
11
- } : DropzoneHanders < HTMLElement > & { children ?: ReactNode } ) : ReactElement {
11
+ } : DropzoneHandlers < HTMLElement > & { children ?: ReactNode } ) : ReactElement {
12
12
const [ isOver , handlers ] = useDropzone ( options ) ;
13
13
14
14
return (
Original file line number Diff line number Diff line change 1
1
import type { DragEvent , HTMLAttributes } from "react" ;
2
2
import { useCallback , useState } from "react" ;
3
3
4
- /** @remarks \@since 2.9.0 */
5
- export type DropzoneHanders < E extends HTMLElement > = Pick <
4
+ /**
5
+ * @remarks \@since 2.9.0
6
+ * @deprecated \@since 5.1.3 Use `DropzoneHandlers` instead.
7
+ */
8
+ export type DropzoneHanders < E extends HTMLElement > = DropzoneHandlers < E > ;
9
+
10
+ /** @remarks \@since 5.1.3 */
11
+ export type DropzoneHandlers < E extends HTMLElement > = Pick <
6
12
HTMLAttributes < E > ,
7
13
"onDragEnter" | "onDragOver" | "onDrop" | "onDragLeave"
8
14
> ;
9
15
10
16
/** @remarks \@since 2.9.0 */
11
17
export type DropzoneHookReturnValue < E extends HTMLElement > = [
12
18
boolean ,
13
- DropzoneHanders < E >
19
+ DropzoneHandlers < E >
14
20
] ;
15
21
16
22
/**
@@ -44,13 +50,13 @@ export type DropzoneHookReturnValue<E extends HTMLElement> = [
44
50
* ```
45
51
*
46
52
* @see {@link useFileUpload } for a more complex example
47
- * @param options - The {@link DropzoneHanders } that can be merged with the
53
+ * @param options - The {@link DropzoneHandlers } that can be merged with the
48
54
* default functionality.
49
55
* @returns the {@link DropzoneHookReturnValue}
50
56
* @remarks \@since 2.9.0
51
57
*/
52
58
export function useDropzone < E extends HTMLElement > (
53
- options : DropzoneHanders < E >
59
+ options : DropzoneHandlers < E >
54
60
) : DropzoneHookReturnValue < E > {
55
61
const {
56
62
onDragEnter : propOnDragEnter ,
You can’t perform that action at this time.
0 commit comments