Commit cc31954 1 parent faa13e5 commit cc31954 Copy full SHA for cc31954
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ function App() {
200
200
setNotifOpen ( true )
201
201
}
202
202
} , [ ] )
203
- const { getRootProps, isDragActive} = useDropzone ( { onDrop} )
203
+ const { getRootProps, getInputProps , isDragActive} = useDropzone ( { onDrop} )
204
204
205
205
const handleClose = ( event : SyntheticEvent , reason ?: SnackbarCloseReason ) => {
206
206
if ( reason === 'clickaway' ) {
@@ -271,15 +271,15 @@ function App() {
271
271
< Grid container >
272
272
< Grid item xs = { 2 } />
273
273
< Grid item xs = { 4 } >
274
- < Card { ... getRootProps ( ) } className = { classes . imageBox } >
275
- < CardContent { ... getRootProps ( ) } >
274
+ < Card className = { classes . imageBox } >
275
+ < CardContent >
276
276
< Typography gutterBottom variant = "h5" component = "div" > Original Image</ Typography >
277
277
</ CardContent >
278
278
< div { ...getRootProps ( ) } className = { classes . selectBox }
279
279
style = { { border : isDragActive ? '2px dashed green' : '2px dashed grey' } } >
280
280
{ imageSrc !== "" ?
281
- < img alt = "original" src = { imageSrc } style = { { maxHeight : 160 , maxWidth : 160 } } /> :
282
- < p > Drop the image here</ p >
281
+ < div > < input { ... getInputProps ( ) } /> < img alt = "original" src = { imageSrc } style = { { maxHeight : 160 , maxWidth : 160 } } /> </ div > :
282
+ < div > < input { ... getInputProps ( ) } /> < p > Drop the image here or click to load </ p > </ div >
283
283
}
284
284
</ div >
285
285
</ Card >
You can’t perform that action at this time.
0 commit comments