Permalink
Browse files

update export babel 5 to 6

  • Loading branch information...
1 parent c7a4770 commit bb04ca936b1604a444a54332ac0435c895e6b65b @kiuka kiuka committed Nov 7, 2016
Showing with 16,461 additions and 14,350 deletions.
  1. +1 −1 .babelrc
  2. +14 −7 dist/Footer.js
  3. +14 −7 dist/Header.js
  4. +30 −21 dist/Section.js
  5. +93 −96 dist/SectionsContainer.js
  6. +16,304 −14,213 example/bundle.js
  7. +2 −3 example/webpack.config.js
  8. +3 −2 package.json
View
@@ -1,3 +1,3 @@
{
- "presets": ["react"]
+ "presets": ["es2015", "react"]
}
View
@@ -1,24 +1,31 @@
-import React from 'react';
+'use strict';
-const Footer = React.createClass({
- displayName: 'Footer',
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _react = require('react');
+var _react2 = _interopRequireDefault(_react);
- render() {
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Footer = _react2.default.createClass({
+ displayName: 'Footer',
+ render: function render() {
var footerStyle = {
position: 'fixed',
width: '100%',
zIndex: '1',
bottom: '0'
};
- return React.createElement(
+ return _react2.default.createElement(
'footer',
{ style: footerStyle },
this.props.children
);
}
-
});
-export default Footer;
+exports.default = Footer;
View
@@ -1,24 +1,31 @@
-import React from 'react';
+'use strict';
-const Header = React.createClass({
- displayName: 'Header',
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _react = require('react');
+var _react2 = _interopRequireDefault(_react);
- render() {
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Header = _react2.default.createClass({
+ displayName: 'Header',
+ render: function render() {
var headerStyle = {
position: 'fixed',
width: '100%',
zIndex: '1',
top: '0'
};
- return React.createElement(
+ return _react2.default.createElement(
'header',
{ style: headerStyle },
this.props.children
);
}
-
});
-export default Header;
+exports.default = Header;
View
@@ -1,43 +1,53 @@
-import React from 'react';
+'use strict';
-const Section = React.createClass({
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Section = _react2.default.createClass({
displayName: 'Section',
propTypes: {
- color: React.PropTypes.string
+ color: _react2.default.PropTypes.string
},
contextTypes: {
- verticalAlign: React.PropTypes.bool,
- sectionClassName: React.PropTypes.string,
- sectionPaddingTop: React.PropTypes.string,
- sectionPaddingBottom: React.PropTypes.string
+ verticalAlign: _react2.default.PropTypes.bool,
+ sectionClassName: _react2.default.PropTypes.string,
+ sectionPaddingTop: _react2.default.PropTypes.string,
+ sectionPaddingBottom: _react2.default.PropTypes.string
},
- getInitialState: function () {
+ getInitialState: function getInitialState() {
return {
windowHeight: window.innerHeight
};
},
- handleResize: function () {
+ handleResize: function handleResize() {
this.setState({
windowHeight: window.innerHeight
});
},
- componentDidMount: function () {
+ componentDidMount: function componentDidMount() {
window.addEventListener('resize', this.handleResize);
},
- componentWillUnmount: function () {
+ componentWillUnmount: function componentWillUnmount() {
window.removeEventListener('resize', this.handleResize);
},
- render() {
- let alignVertical = this.props.verticalAlign || this.context.verticalAlign;
+ render: function render() {
+ var alignVertical = this.props.verticalAlign || this.context.verticalAlign;
- let sectionStyle = {
+ var sectionStyle = {
width: '100%',
display: alignVertical ? 'table' : 'block',
height: this.state.windowHeight,
@@ -48,26 +58,25 @@ const Section = React.createClass({
paddingBottom: this.context.sectionPaddingBottom
};
- return React.createElement(
+ return _react2.default.createElement(
'div',
- { className: this.context.sectionClassName + (this.props.className ? ` ${ this.props.className }` : ''), id: this.props.id, style: sectionStyle },
+ { className: this.context.sectionClassName + (this.props.className ? ' ' + this.props.className : ''), id: this.props.id, style: sectionStyle },
alignVertical ? this._renderVerticalAlign() : this.props.children
);
},
-
- _renderVerticalAlign() {
- let verticalAlignStyle = {
+ _renderVerticalAlign: function _renderVerticalAlign() {
+ var verticalAlignStyle = {
display: 'table-cell',
verticalAlign: 'middle',
width: '100%'
};
- return React.createElement(
+ return _react2.default.createElement(
'div',
{ style: verticalAlignStyle },
this.props.children
);
}
});
-export default Section;
+exports.default = Section;
Oops, something went wrong.

0 comments on commit bb04ca9

Please sign in to comment.