From c0ad25715bc050dac0134ccd46f25884396d0f87 Mon Sep 17 00:00:00 2001
From: Matthew Shao <me@matshao.com>
Date: Wed, 28 Jun 2017 18:48:31 +0800
Subject: [web] Add Modal Component and OptionModal

---
 web/src/js/components/Modal/OptionModal.jsx | 33 +++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 web/src/js/components/Modal/OptionModal.jsx

(limited to 'web/src/js/components/Modal/OptionModal.jsx')

diff --git a/web/src/js/components/Modal/OptionModal.jsx b/web/src/js/components/Modal/OptionModal.jsx
new file mode 100644
index 00000000..d9e8b829
--- /dev/null
+++ b/web/src/js/components/Modal/OptionModal.jsx
@@ -0,0 +1,33 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+
+OptionModal.prototype = {
+    hideModal: PropTypes.function,
+}
+
+export default function OptionModal( { hideModal }) {
+    const title = 'Options'
+    return (
+        <div className="modal modal-visible" id="optionsModal" tabIndex="-1" role="dialog" aria-labelledby="options">
+        <div className="modal-dialog modal-lg" role="document">
+            <div className="modal-content">
+                <div className="modal-header">
+                    <button type="button" className="close" data-dismiss="modal" onClick={() => { hideModal() }}>
+                        <i className="fa fa-fw fa-times"></i>
+                    </button>
+                    <div className="modal-title">
+                        <h4>{ title }</h4>
+                    </div>
+                </div>
+
+                <div className="modal-body">
+                </div>
+
+                <div className="modal-footer">
+                    <button type="button" className="btn btn-primary">Save Changes</button>
+                </div>
+            </div>
+        </div>
+    </div>
+    )
+}
-- 
cgit v1.2.3


From 7baf3069b169e8196e5d389e655a3a187b4329d9 Mon Sep 17 00:00:00 2001
From: Matthew Shao <me@matshao.com>
Date: Fri, 30 Jun 2017 20:46:02 +0800
Subject: [web] Update the Structure of Modal component.

---
 web/src/js/components/Modal/OptionModal.jsx | 33 -----------------------------
 1 file changed, 33 deletions(-)
 delete mode 100644 web/src/js/components/Modal/OptionModal.jsx

(limited to 'web/src/js/components/Modal/OptionModal.jsx')

diff --git a/web/src/js/components/Modal/OptionModal.jsx b/web/src/js/components/Modal/OptionModal.jsx
deleted file mode 100644
index d9e8b829..00000000
--- a/web/src/js/components/Modal/OptionModal.jsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-
-OptionModal.prototype = {
-    hideModal: PropTypes.function,
-}
-
-export default function OptionModal( { hideModal }) {
-    const title = 'Options'
-    return (
-        <div className="modal modal-visible" id="optionsModal" tabIndex="-1" role="dialog" aria-labelledby="options">
-        <div className="modal-dialog modal-lg" role="document">
-            <div className="modal-content">
-                <div className="modal-header">
-                    <button type="button" className="close" data-dismiss="modal" onClick={() => { hideModal() }}>
-                        <i className="fa fa-fw fa-times"></i>
-                    </button>
-                    <div className="modal-title">
-                        <h4>{ title }</h4>
-                    </div>
-                </div>
-
-                <div className="modal-body">
-                </div>
-
-                <div className="modal-footer">
-                    <button type="button" className="btn btn-primary">Save Changes</button>
-                </div>
-            </div>
-        </div>
-    </div>
-    )
-}
-- 
cgit v1.2.3


From aad0b95cbe65e97574d49f3933002d347470d1ef Mon Sep 17 00:00:00 2001
From: Matthew Shao <me@matshao.com>
Date: Fri, 30 Jun 2017 21:12:50 +0800
Subject: [web] Update js/components/Modal/OptionModal.jsx

---
 web/src/js/components/Modal/OptionModal.jsx | 45 +++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 web/src/js/components/Modal/OptionModal.jsx

(limited to 'web/src/js/components/Modal/OptionModal.jsx')

diff --git a/web/src/js/components/Modal/OptionModal.jsx b/web/src/js/components/Modal/OptionModal.jsx
new file mode 100644
index 00000000..500495c4
--- /dev/null
+++ b/web/src/js/components/Modal/OptionModal.jsx
@@ -0,0 +1,45 @@
+import React, { Component } from 'react'
+import { connect } from 'react-redux'
+import * as modalAction from '../../ducks/ui/modal'
+
+class PureOptionModal extends Component {
+
+    constructor(props, context) {
+        super(props, context)
+        this.state = { title: 'Options',  }
+    }
+
+    render() {
+        const { hideModal } = this.props
+        const { title } = this.state
+        return (
+            <div>
+                <div className="modal-header">
+                    <button type="button" className="close" data-dismiss="modal" onClick={() => {
+                        hideModal()
+                    }}>
+                        <i className="fa fa-fw fa-times"></i>
+                    </button>
+                    <div className="modal-title">
+                        <h4>{ title }</h4>
+                    </div>
+                </div>
+
+                <div className="modal-body">
+                    ...
+                </div>
+
+                <div className="modal-footer">
+                    <button type="button" className="btn btn-primary">Save Changes</button>
+                </div>
+            </div>
+        )
+    }
+}
+
+export default connect(
+    state => ({
+
+    }),
+    { hideModal: modalAction.hideModal }
+)(PureOptionModal)
-- 
cgit v1.2.3

