Created
April 3, 2015 20:35
-
-
Save natew/61e83705d582bf33ea43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* WEBPACK VAR INJECTION */(function(module) {/* REACT HOT LOADER */ if (true) { (function () { var ReactHotAPI = __webpack_require__(/*! /Users/nw/projects/reapp/reapp-pack/~/react-hot-loader/~/react-hot-api/modules/index.js */ 236), RootInstanceProvider = __webpack_require__(/*! /Users/nw/projects/reapp/reapp-pack/~/react-hot-loader/RootInstanceProvider.js */ 230), ReactMount = __webpack_require__(/*! react/lib/ReactMount */ 7), React = __webpack_require__(/*! react */ 2); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } (function () { | |
'use strict'; | |
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; | |
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (descriptor.value) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | |
var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; | |
var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | |
var _React$Button$Tweenable = __webpack_require__(/*! reapp-kit */ 84); | |
var distanceFromBottom = 60; | |
var _default = (function (_React$Component) { | |
var _class = function _default(props) { | |
_classCallCheck(this, _class); | |
_get(Object.getPrototypeOf(_class.prototype), 'constructor', this).call(this, props); | |
this.state = { step: 0 }; | |
}; | |
_inherits(_class, _React$Component); | |
_createClass(_class, [{ | |
key: 'componentWillMount', | |
value: function componentWillMount() { | |
var doIntro = !this.context.store().get('completedIntro'); | |
if (!doIntro) this.setState({ step: 1 }); | |
this.tweenState('step', { endValue: 1 }); | |
} | |
}, { | |
key: 'componentWillUnmount', | |
value: function componentWillUnmount() { | |
this.context.actions.unlisten('introStep', this.stepper); | |
} | |
}, { | |
key: 'render', | |
value: function render() { | |
var buttonStyles = styles.button; | |
var step = this.getTweeningValue('step'); | |
buttonStyles.self.bottom = distanceFromBottom * this.state.step; | |
buttonStyles.self.opacity = this.state.step; | |
return _React$Button$Tweenable.React.createElement(_React$Button$Tweenable.Button, { | |
chromeless: true, | |
styles: buttonStyles, | |
iconProps: addIconProps, | |
onTap: this.props.handleAdd | |
}); | |
} | |
}]); | |
_class = _React$Button$Tweenable.Tweenable(_class) || _class; | |
return _class; | |
})(_React$Button$Tweenable.React.Component); | |
module.exports = _default; | |
var addIconProps = { | |
size: 34, | |
stroke: 0, | |
color: '#fff', | |
file: __webpack_require__(/*! reapp-kit/icons/add.svg */ 252) | |
}; | |
var styles = { | |
button: { | |
self: { | |
background: 'rgba(0,0,0,0.3)', | |
borderRadius: 100, | |
position: 'fixed', | |
bottom: distanceFromBottom, | |
right: 10, | |
zIndex: 15 | |
} | |
} | |
}; | |
// this.context.actions('introStep', step => { | |
// if (step >= 1) | |
// this.setState({ step: step - 1 }); | |
// }); | |
/* REACT HOT LOADER */ })(); if (true) { (function () { module.hot.dispose(function (data) { data.makeHot = module.makeHot; }); if (module.exports && module.makeHot) { var makeExportsHot = __webpack_require__(/*! /Users/nw/projects/reapp/reapp-pack/~/react-hot-loader/makeExportsHot.js */ 231), foundReactClasses = false; if (makeExportsHot(module, __webpack_require__(/*! react */ 2))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "AddButton.jsx" + ": " + err.message); } }); } } })(); } | |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! (webpack)/buildin/module.js */ 184)(module))) | |
/***************** | |
** WEBPACK FOOTER | |
** ./app/components/shared/AddButton.jsx | |
** module id = 127 | |
** module chunks = 0 | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment