From 13725f040bca346a7b35b832f36f4e86c5da11e4 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 7 Feb 2019 03:05:59 -0500
Subject: Add avatar crop popup
---
src/components/modal/modal.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 src/components/modal/modal.js
(limited to 'src/components/modal/modal.js')
diff --git a/src/components/modal/modal.js b/src/components/modal/modal.js
new file mode 100644
index 00000000..36cd7f4a
--- /dev/null
+++ b/src/components/modal/modal.js
@@ -0,0 +1,17 @@
+const Modal = {
+ props: ['show', 'title'],
+ methods: {
+ close: function () {
+ this.$emit('close')
+ }
+ },
+ mounted: function () {
+ document.addEventListener('keydown', (e) => {
+ if (this.show && e.keyCode === 27) {
+ this.close()
+ }
+ })
+ }
+}
+
+export default Modal
--
cgit v1.2.3-70-g09d2