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";
22import cn from "classnames" ;
33import { fireEvent , render } from "@testing-library/react" ;
44
5- import type { DropzoneHanders } from "../useDropzone" ;
5+ import type { DropzoneHandlers } from "../useDropzone" ;
66import { useDropzone } from "../useDropzone" ;
77
88function Test ( {
99 children,
1010 ...options
11- } : DropzoneHanders < HTMLElement > & { children ?: ReactNode } ) : ReactElement {
11+ } : DropzoneHandlers < HTMLElement > & { children ?: ReactNode } ) : ReactElement {
1212 const [ isOver , handlers ] = useDropzone ( options ) ;
1313
1414 return (
Original file line number Diff line number Diff line change 11import type { DragEvent , HTMLAttributes } from "react" ;
22import { useCallback , useState } from "react" ;
33
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 <
612 HTMLAttributes < E > ,
713 "onDragEnter" | "onDragOver" | "onDrop" | "onDragLeave"
814> ;
915
1016/** @remarks \@since 2.9.0 */
1117export type DropzoneHookReturnValue < E extends HTMLElement > = [
1218 boolean ,
13- DropzoneHanders < E >
19+ DropzoneHandlers < E >
1420] ;
1521
1622/**
@@ -44,13 +50,13 @@ export type DropzoneHookReturnValue<E extends HTMLElement> = [
4450 * ```
4551 *
4652 * @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
4854 * default functionality.
4955 * @returns the {@link DropzoneHookReturnValue}
5056 * @remarks \@since 2.9.0
5157 */
5258export function useDropzone < E extends HTMLElement > (
53- options : DropzoneHanders < E >
59+ options : DropzoneHandlers < E >
5460) : DropzoneHookReturnValue < E > {
5561 const {
5662 onDragEnter : propOnDragEnter ,
You can’t perform that action at this time.
0 commit comments