aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorsdtsui <szehungdanieltsui@gmail.com>2017-08-14 01:24:51 +0800
committersdtsui <szehungdanieltsui@gmail.com>2017-08-14 01:24:51 +0800
commit25184a3901f96e3c4fea94ed0bd135fbe7597148 (patch)
tree0b489f718fa903f1d68e9f35a60ca8ebec5ca6d0 /ui/app/components
parent9b48e0aa53ff73fe526c4788c929b0ffe5a2d499 (diff)
downloadtangerine-wallet-browser-25184a3901f96e3c4fea94ed0bd135fbe7597148.tar.gz
tangerine-wallet-browser-25184a3901f96e3c4fea94ed0bd135fbe7597148.tar.zst
tangerine-wallet-browser-25184a3901f96e3c4fea94ed0bd135fbe7597148.zip
Move global modals into own pod, inside components/modals
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/modals/buy-modal.js27
-rw-r--r--ui/app/components/modals/index.js9
-rw-r--r--ui/app/components/modals/modal.js (renamed from ui/app/components/modal.js)7
3 files changed, 40 insertions, 3 deletions
diff --git a/ui/app/components/modals/buy-modal.js b/ui/app/components/modals/buy-modal.js
new file mode 100644
index 000000000..c1bf1d0df
--- /dev/null
+++ b/ui/app/components/modals/buy-modal.js
@@ -0,0 +1,27 @@
+const Component = require('react').Component
+const h = require('react-hyperscript')
+const inherits = require('util').inherits
+const connect = require('react-redux').connect
+const FadeModal = require('boron').FadeModal
+const actions = require('../../actions')
+const isMobileView = require('../../../lib/is-mobile-view')
+const isPopupOrNotification = require('../../../../app/scripts/lib/is-popup-or-notification')
+const BuyOptions = require('../buy-options')
+
+inherits(BuyModal, Component)
+function BuyModal () {
+ Component.call(this)
+}
+
+module.exports = BuyModal
+
+BuyModal.prototype.render = function () {
+ return h(BuyModal, {
+ ref: "modalRef",
+ }, [
+ h(BuyOptions, {}, []),
+ ])
+
+}
+
+// TODO: specify default props and proptypes
diff --git a/ui/app/components/modals/index.js b/ui/app/components/modals/index.js
new file mode 100644
index 000000000..23b432b7c
--- /dev/null
+++ b/ui/app/components/modals/index.js
@@ -0,0 +1,9 @@
+const Modal = require('./modal')
+const BuyModal = require('./buy-modal')
+// const h = require('account-options')
+// const h = require('account-details')
+
+module.exports = {
+ Modal,
+ BuyModal,
+} \ No newline at end of file
diff --git a/ui/app/components/modal.js b/ui/app/components/modals/modal.js
index 010122d42..006e009b3 100644
--- a/ui/app/components/modal.js
+++ b/ui/app/components/modals/modal.js
@@ -3,9 +3,9 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
const FadeModal = require('boron').FadeModal
-const actions = require('../actions')
-const isMobileView = require('../../lib/is-mobile-view')
-const isPopupOrNotification = require('../../../app/scripts/lib/is-popup-or-notification')
+const actions = require('../../actions')
+const isMobileView = require('../../../lib/is-mobile-view')
+const isPopupOrNotification = require('../../../../app/scripts/lib/is-popup-or-notification')
function mapStateToProps (state) {
return {
@@ -21,6 +21,7 @@ function mapDispatchToProps (dispatch) {
}
}
+// Global Modal Component
inherits(Modal, Component)
function Modal () {
Component.call(this)