File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
app/src/components/Upload Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,17 @@ import { useUploadContext } from './UploadContext'
7
7
const UploadBody = forwardRef < HTMLDivElement , HTMLAttributes < HTMLDivElement > > (
8
8
( { children, className, ...props } , ref : Ref < HTMLDivElement > ) => {
9
9
const { options, horizontal } = useUploadContext ( )
10
- const { getRootProps, getInputProps } = useDropzone ( options )
10
+ const { getRootProps, getInputProps, isDragActive , isDragReject } = useDropzone ( options )
11
11
return (
12
12
< div
13
13
{ ...props }
14
14
ref = { ref }
15
15
{ ...getRootProps ( ) }
16
16
className = { cn (
17
- horizontal
18
- ? 'flex cursor-pointer items-center gap-4 rounded-xl border border-dashed bg-white px-3 transition-all duration-300 hover:bg-metal-25 dark:border-metal-800 dark:bg-metal-900 dark:hover:bg-metal-900'
19
- : 'flex cursor-pointer flex-col items-center rounded-xl border border-dashed border-metal-50 bg-white p-3 text-center transition-all duration-300 hover:bg-metal-25 dark:border-metal-800 dark:bg-metal-900 dark:hover:bg-metal-900' ,
17
+ 'flex cursor-pointer items-center rounded-xl border border-dashed bg-white transition-all duration-300 hover:bg-metal-25 dark:border-metal-800 dark:bg-metal-900 dark:hover:bg-metal-900' ,
18
+ horizontal ? 'gap-4 px-3' : 'flex-col border-metal-50 p-3 text-center' ,
19
+ isDragActive && 'border-primary-500 dark:border-primary-400' ,
20
+ isDragReject && 'border-error-500 dark:border-error-500' ,
20
21
className ,
21
22
) } >
22
23
< input { ...getInputProps ( ) } />
You can’t perform that action at this time.
0 commit comments