react-use-file-upload
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -8,5 +8,5 @@ export declare type useFileUploadHook = { | ||
getFileTypes: () => string[]; | ||
onFileDrag: (e: Event) => void; | ||
handleFileDDEvent: (e: Event) => void; | ||
removeFile: (file: number | string) => void; | ||
setFiles: (files: FileList) => void; | ||
}; |
@@ -25,5 +25,5 @@ "use strict"; | ||
/** | ||
* @function onFileDrag | ||
* @function handleFileDDEvent | ||
*/ | ||
const onFileDrag = (e) => { | ||
const handleFileDDEvent = (e) => { | ||
e.stopPropagation(); | ||
@@ -92,3 +92,3 @@ e.preventDefault(); | ||
getFileTypes, | ||
onFileDrag, | ||
handleFileDDEvent, | ||
removeFile, | ||
@@ -95,0 +95,0 @@ setFiles, |
{ | ||
"name": "react-use-file-upload", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A React Hook to make dealing with file uploading easier.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -21,3 +21,3 @@ import { renderHook, act } from '@testing-library/react-hooks'; | ||
expect(typeof result.current.getFileTypes).toBe('function'); | ||
expect(typeof result.current.onFileDrag).toBe('function'); | ||
expect(typeof result.current.handleFileDDEvent).toBe('function'); | ||
expect(typeof result.current.removeFile).toBe('function'); | ||
@@ -24,0 +24,0 @@ expect(typeof result.current.setFiles).toBe('function'); |
@@ -8,5 +8,5 @@ export type useFileUploadHook = { | ||
getFileTypes: () => string[]; | ||
onFileDrag: (e: Event) => void; | ||
handleFileDDEvent: (e: Event) => void; | ||
removeFile: (file: number | string) => void; | ||
setFiles: (files: FileList) => void; | ||
}; |
@@ -26,5 +26,5 @@ import { useState, useCallback } from 'react'; | ||
/** | ||
* @function onFileDrag | ||
* @function handleFileDDEvent | ||
*/ | ||
const onFileDrag = (e: Event) => { | ||
const handleFileDDEvent = (e: Event) => { | ||
e.stopPropagation(); | ||
@@ -102,3 +102,3 @@ e.preventDefault(); | ||
getFileTypes, | ||
onFileDrag, | ||
handleFileDDEvent, | ||
removeFile, | ||
@@ -105,0 +105,0 @@ setFiles, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12480