|
|
@ -1,10 +1,7 @@ |
|
|
|
const Component = require('react').Component |
|
|
|
const Component = require('react').Component |
|
|
|
|
|
|
|
|
|
|
|
const h = require('react-hyperscript') |
|
|
|
const h = require('react-hyperscript') |
|
|
|
const inherits = require('util').inherits |
|
|
|
const inherits = require('util').inherits |
|
|
|
const connect = require('react-redux').connect |
|
|
|
const connect = require('react-redux').connect |
|
|
|
// const elementType = require('react-prop-types/lib/elementType')
|
|
|
|
|
|
|
|
// const PropTypes from 'prop-types'
|
|
|
|
|
|
|
|
const FadeModal = require('boron').FadeModal |
|
|
|
const FadeModal = require('boron').FadeModal |
|
|
|
const actions = require('../actions') |
|
|
|
const actions = require('../actions') |
|
|
|
const isMobileView = require('../../lib/is-mobile-view') |
|
|
|
const isMobileView = require('../../lib/is-mobile-view') |
|
|
@ -30,8 +27,6 @@ function Modal () { |
|
|
|
|
|
|
|
|
|
|
|
module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal) |
|
|
|
module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal) |
|
|
|
|
|
|
|
|
|
|
|
Modal.prototype.render = function () { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const mobileModalStyles = { |
|
|
|
const mobileModalStyles = { |
|
|
|
width: '95%', |
|
|
|
width: '95%', |
|
|
|
} |
|
|
|
} |
|
|
@ -41,6 +36,8 @@ Modal.prototype.render = function () { |
|
|
|
top: '30%', |
|
|
|
top: '30%', |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Modal.prototype.render = function () { |
|
|
|
|
|
|
|
|
|
|
|
return h(FadeModal, |
|
|
|
return h(FadeModal, |
|
|
|
{ |
|
|
|
{ |
|
|
|
className: 'modal', |
|
|
|
className: 'modal', |
|
|
@ -78,8 +75,12 @@ Modal.prototype.show = function() { |
|
|
|
this.modalRef.show() |
|
|
|
this.modalRef.show() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: specify default props and proptypes
|
|
|
|
// Modal.defaultProps = {}
|
|
|
|
// Modal.defaultProps = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const elementType = require('react-prop-types/lib/elementType')
|
|
|
|
|
|
|
|
// const PropTypes from 'prop-types'
|
|
|
|
|
|
|
|
|
|
|
|
// Modal.propTypes = {
|
|
|
|
// Modal.propTypes = {
|
|
|
|
// active: PropTypes.bool,
|
|
|
|
// active: PropTypes.bool,
|
|
|
|
// hideModal: PropTypes.func.isRequired,
|
|
|
|
// hideModal: PropTypes.func.isRequired,
|
|
|
|