Skip to content

Commit

Permalink
[@mantine/dropzone] Change onDrop type from File to FileWithPath #2250 (
Browse files Browse the repository at this point in the history
  • Loading branch information
Meierschlumpf committed Aug 27, 2022
1 parent 7d578c4 commit c66cb1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mantine-dropzone/src/Dropzone.tsx
@@ -1,5 +1,5 @@
import React, { forwardRef } from 'react';
import { useDropzone, FileRejection, Accept } from 'react-dropzone';
import { useDropzone, FileRejection, Accept, FileWithPath } from 'react-dropzone';
import {
DefaultProps,
Selectors,
Expand Down Expand Up @@ -33,7 +33,7 @@ export interface DropzoneProps
disabled?: boolean;

/** Called when files are dropped into dropzone */
onDrop(files: File[]): void;
onDrop(files: FileWithPath[]): void;

/** Called when selected files don't meet file restrictions */
onReject?(fileRejections: FileRejection[]): void;
Expand Down
1 change: 1 addition & 0 deletions src/mantine-dropzone/src/index.ts
Expand Up @@ -9,3 +9,4 @@ export type { DropzoneFullScreenProps, DropzoneFullScreenStylesName } from './Dr
export type { DropzoneStylesParams } from './Dropzone.styles';
export type { DropzoneAcceptProps, DropzoneRejectProps, DropzoneIdleProps } from './DropzoneStatus';
export * from './mime-types';
export { FileWithPath } from 'react-dropzone';

0 comments on commit c66cb1e

Please sign in to comment.