rui-components
Advanced tools
Comparing version 1.1.8 to 1.1.10
@@ -11,7 +11,7 @@ 'use strict'; | ||
var _Aligner = require('../../primitives/Aligner'); | ||
var _Aligner = require('../../primitives/Aligner.js'); | ||
var _Padder = require('../../primitives/Padder'); | ||
var _Spacer = require('../../primitives/Spacer.js'); | ||
var _WidthLimiter = require('../../primitives/WidthLimiter'); | ||
var _WidthLimiter = require('../../primitives/WidthLimiter.js'); | ||
@@ -35,4 +35,2 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var children = props.children, | ||
_props$padding = props.padding, | ||
padding = _props$padding === undefined ? [] : _props$padding, | ||
_props$limited = props.limited, | ||
@@ -42,4 +40,2 @@ limited = _props$limited === undefined ? false : _props$limited, | ||
align = _props$align === undefined ? false : _props$align, | ||
_props$full = props.full, | ||
full = _props$full === undefined ? false : _props$full, | ||
_props$autocenter = props.autocenter, | ||
@@ -49,15 +45,17 @@ autocenter = _props$autocenter === undefined ? false : _props$autocenter; | ||
return _react2.default.createElement( | ||
_WidthLimiter.WidthLimiter, | ||
{ limited: limited, autocenter: autocenter, className: 'Container' }, | ||
_react2.default.createElement( | ||
_Aligner.Aligner, | ||
{ align: align }, | ||
_react2.default.createElement( | ||
_Padder.Padder, | ||
{ padding: padding, full: full }, | ||
children | ||
) | ||
) | ||
); | ||
var renderWidthLimiter = limited || autocenter; | ||
var renderAligner = align; | ||
var componentsToRender = [_Spacer.Spacer, renderWidthLimiter && _WidthLimiter.WidthLimiter, renderAligner && _Aligner.Aligner].filter(function (c) { | ||
return c !== false; | ||
}); | ||
// Conditionally return only required components | ||
return componentsToRender.reduce(function (result, Component) { | ||
return _react2.default.createElement( | ||
Component, | ||
props, | ||
result | ||
); | ||
}, children); | ||
} | ||
@@ -67,8 +65,4 @@ | ||
children: _react.PropTypes.oneOfType([_react2.default.PropTypes.element, _react.PropTypes.arrayOf(_react2.default.PropTypes.element)]), | ||
padding: _react2.default.PropTypes.arrayOf(_react2.default.PropTypes.shape({ | ||
top: _react2.default.PropTypes.string, | ||
right: _react2.default.PropTypes.string, | ||
bottom: _react2.default.PropTypes.string, | ||
left: _react2.default.PropTypes.string | ||
})), | ||
margin: _react2.default.PropTypes.arrayOf(_react2.default.PropTypes.string), | ||
padding: _react2.default.PropTypes.arrayOf(_react2.default.PropTypes.string), | ||
limited: _react.PropTypes.string, | ||
@@ -75,0 +69,0 @@ align: _react.PropTypes.string, |
@@ -7,3 +7,5 @@ "use strict"; | ||
exports.default = { | ||
gutter: 1, | ||
gutter: { | ||
fluid: 5, // % | ||
fixed: 1 }, | ||
breakpoints: { | ||
@@ -10,0 +12,0 @@ elder: 1470, |
@@ -6,3 +6,3 @@ { | ||
"user": "bnhovde", | ||
"version": "1.1.8", | ||
"version": "1.1.10", | ||
"scripts": { | ||
@@ -9,0 +9,0 @@ "start": "webpack-dev-server", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1641453
7052
36