aboutsummaryrefslogtreecommitdiff
path: root/src/mobile/ImageUpload.tsx
diff options
context:
space:
mode:
authorAndrew Kim <andrewdkim@users.noreply.github.com>2019-03-16 23:58:19 -0400
committerAndrew Kim <andrewdkim@users.noreply.github.com>2019-03-16 23:58:19 -0400
commiteeae1bd225080e900d78d41dca3ec62d16d47e6f (patch)
treef7349b6d3217d373733c706bd445e6c375548e8d /src/mobile/ImageUpload.tsx
parent7d24a1a063b0a087b51a4c521479ffcb63638d98 (diff)
Testing Mobile Image
Diffstat (limited to 'src/mobile/ImageUpload.tsx')
-rw-r--r--src/mobile/ImageUpload.tsx23
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