diff options
Diffstat (limited to 'src/mobile/ImageUpload.tsx')
-rw-r--r-- | src/mobile/ImageUpload.tsx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/mobile/ImageUpload.tsx b/src/mobile/ImageUpload.tsx index a43e6e365..6e15b0802 100644 --- a/src/mobile/ImageUpload.tsx +++ b/src/mobile/ImageUpload.tsx @@ -1,14 +1,21 @@ import * as ReactDOM from 'react-dom'; import React = require('react'); +import "./ImageUpload.scss" + + + +const onPointerDown = (e: React.TouchEvent) => { + let imgInput = document.getElementById("input_image_file"); + if (imgInput){ + imgInput.click(); + } +} ReactDOM.render(( - <div - style={{ - position: "absolute", - width: "100%", - height: "100%", - background: "yellow" - }} - ></div>), + <div className = "imgupload_cont"> + <button className = "button_file" onTouchStart = {onPointerDown}> Open Image </button> + <input type= "file" accept = "image/*" capture="camera" className = "input_file" id = "input_image_file"></input> + + </div>), document.getElementById('root') );
\ No newline at end of file |