|
|
|
@ -66,22 +66,38 @@ function ImageUpload({ onImageURLSet, onImageUploading }) { |
|
|
|
default: |
|
|
|
default: |
|
|
|
case IDLE: |
|
|
|
case IDLE: |
|
|
|
componente = ( |
|
|
|
componente = ( |
|
|
|
<> |
|
|
|
<Stack |
|
|
|
|
|
|
|
style={{ justifyContent: "center", alignItems: "center" }} |
|
|
|
|
|
|
|
direction="row" |
|
|
|
|
|
|
|
> |
|
|
|
<input |
|
|
|
<input |
|
|
|
style={{ display: "none" }} |
|
|
|
style={{ display: "none" }} |
|
|
|
id="raised-button-file" |
|
|
|
id="camera-input" |
|
|
|
multiple |
|
|
|
multiple |
|
|
|
type="file" |
|
|
|
type="file" |
|
|
|
accept="image/*" |
|
|
|
accept="image/*" |
|
|
|
capture="camera" |
|
|
|
capture="camera" |
|
|
|
onChange={handleChange} |
|
|
|
onChange={handleChange} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<label htmlFor="raised-button-file"> |
|
|
|
<label htmlFor="camera-input"> |
|
|
|
|
|
|
|
<Button style={{ padding: 20, width: "100%" }} component="span"> |
|
|
|
|
|
|
|
scatta una foto |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<input |
|
|
|
|
|
|
|
style={{ display: "none" }} |
|
|
|
|
|
|
|
id="gallery-input" |
|
|
|
|
|
|
|
multiple |
|
|
|
|
|
|
|
type="file" |
|
|
|
|
|
|
|
accept="image/*" |
|
|
|
|
|
|
|
onChange={handleChange} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<label htmlFor="gallery-input"> |
|
|
|
<Button style={{ padding: 20, width: "100%" }} component="span"> |
|
|
|
<Button style={{ padding: 20, width: "100%" }} component="span"> |
|
|
|
Aggiungi un'immagine |
|
|
|
Aggiungi un'immagine |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</> |
|
|
|
</Stack> |
|
|
|
); |
|
|
|
); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case IMAGE_SET: |
|
|
|
case IMAGE_SET: |
|
|
|
|