From 74e6cc31e83ad570a9f06765d288e9024736e73f Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Sat, 10 Apr 2021 21:35:13 -0500
Subject: Commit MVP

---
 src/components/FileUpload.vue | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 src/components/FileUpload.vue

(limited to 'src/components/FileUpload.vue')

diff --git a/src/components/FileUpload.vue b/src/components/FileUpload.vue
new file mode 100644
index 0000000..b2fdb14
--- /dev/null
+++ b/src/components/FileUpload.vue
@@ -0,0 +1,41 @@
+<template>
+  <label class="file-upload-lbl">
+    <input
+      type="file"
+      :accept="accept"
+      @change="$emit('fileChanged', $event.target.files)"
+      :multiple="multiple" hidden />
+    <slot>Upload</slot>
+  </label>
+</template>
+
+<script>
+export default {
+  name: 'FileUpload',
+  props: {
+    accept: String,
+    multiple: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  emits: {
+    selectionChanged: null,
+  },
+};
+</script>
+
+<style scoped>
+.file-upload-lbl {
+  background-color: #500000;
+  color: white;
+  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+  padding: 5px;
+  text-align: center;
+}
+
+.file-upload-lbl:hover {
+  color: grey;
+  cursor: pointer;
+}
+</style>
-- 
cgit v1.2.3

