react-flexbox
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -7,21 +7,6 @@ import 'babel/polyfill'; | ||
const HelloWorld = React.createClass({ | ||
class HelloWorld extends React.Component { | ||
render() { | ||
return ( | ||
<View column className="border" height="70vh"> | ||
<FlexRow height="50px" style={{alignItems: 'center', alignSelf: 'center'}}>Fully centered header</FlexRow> | ||
<FlexRow className="red"> | ||
<FlexColumn className="border">Column 1</FlexColumn> | ||
<FlexColumn>Column 2</FlexColumn> | ||
</FlexRow> | ||
<FlexRow> | ||
<FlexColumn className="green" width="30%">30% Width</FlexColumn> | ||
<FlexColumn width="60%" style={{background: 'gray'}}>60% Width</FlexColumn> | ||
<FlexColumn>Remaining width. This small column will wrap</FlexColumn> | ||
</FlexRow> | ||
<FlexRow height="100px" className="red"> | ||
<FlexColumn width="50%">50% Width</FlexColumn> | ||
<FlexColumn width="30%">30% Width</FlexColumn> | ||
<FlexColumn>Remaining width</FlexColumn> | ||
</FlexRow> | ||
<View row> | ||
@@ -48,3 +33,3 @@ <View column>Twice the size of the others, the width is set without a unit.</View> | ||
</View> | ||
<View className="green">De rest</View> | ||
<View className="green">All the rest</View> | ||
</View> | ||
@@ -54,4 +39,4 @@ </View> | ||
} | ||
}); | ||
} | ||
React.render(<HelloWorld />, document.body); |
'use strict'; | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
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 ('value' in descriptor) 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 _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 _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
var React = require('react'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _inherits(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 = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var flexStyle = { | ||
@@ -52,5 +59,5 @@ boxSizing: 'border-box', | ||
if (props.style) { | ||
return Object.assign({}, flexStyle, style, divStyle, props.style); | ||
return _extends({}, flexStyle, style, divStyle, props.style); | ||
} else { | ||
return Object.assign({}, flexStyle, style, divStyle); | ||
return _extends({}, flexStyle, style, divStyle); | ||
} | ||
@@ -63,5 +70,3 @@ } | ||
if (_React$Component != null) { | ||
_React$Component.apply(this, arguments); | ||
} | ||
_get(Object.getPrototypeOf(View.prototype), 'constructor', this).apply(this, arguments); | ||
} | ||
@@ -74,2 +79,3 @@ | ||
value: function render() { | ||
console.log('react render'); | ||
var style = mixProps({}, this.props); | ||
@@ -79,3 +85,4 @@ if (this.props.auto) { | ||
} | ||
return React.createElement( | ||
console.log('before'); | ||
return _react2['default'].createElement( | ||
'div', | ||
@@ -89,5 +96,5 @@ _extends({}, this.props, { style: style }), | ||
return View; | ||
})(React.Component); | ||
})(_react2['default'].Component); | ||
exports['default'] = View; | ||
module.exports = exports['default']; |
{ | ||
"name": "react-flexbox", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "React flexbox implementation", | ||
@@ -30,12 +30,12 @@ "author": "Thomas Coopman @tcoopman", | ||
"devDependencies": { | ||
"babel": "^5.5.5", | ||
"babel-eslint": "^3.1.14", | ||
"babel-loader": "^5.1.4", | ||
"eslint": "^0.22.1", | ||
"eslint-plugin-react": "^2.5.0", | ||
"babel": "^5.6.14", | ||
"babel-eslint": "^3.1.20", | ||
"babel-loader": "^5.2.2", | ||
"eslint": "^0.24.0", | ||
"eslint-plugin-react": "^2.6.2", | ||
"debug": "^2.2.0", | ||
"react-hot-loader": "^1.2.7", | ||
"webpack": "^1.9.10", | ||
"webpack-dev-server": "^1.9.0" | ||
"webpack": "^1.10.0", | ||
"webpack-dev-server": "^1.10.1" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
var React = require('react'); | ||
import React from 'react'; | ||
@@ -39,5 +39,5 @@ const flexStyle = { | ||
if (props.style) { | ||
return Object.assign({}, flexStyle, style, divStyle, props.style); | ||
return {...flexStyle, ...style, ...divStyle, ...props.style}; | ||
} else { | ||
return Object.assign({}, flexStyle, style, divStyle); | ||
return {...flexStyle, ...style, ...divStyle}; | ||
} | ||
@@ -48,2 +48,3 @@ } | ||
render() { | ||
console.log('react render'); | ||
const style = mixProps({}, this.props); | ||
@@ -53,4 +54,5 @@ if (this.props.auto) { | ||
} | ||
console.log('before'); | ||
return <div {...this.props} style={style}>{this.props.children}</div>; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11170
12
201