react-relative-portal
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -119,7 +119,10 @@ 'use strict'; | ||
var right = _props.right; | ||
var fullWidth = _props.fullWidth; | ||
var props = _objectWithoutProperties(_props, ['component', 'top', 'left', 'right']); | ||
var props = _objectWithoutProperties(_props, ['component', 'top', 'left', 'right', 'fullWidth']); | ||
var verticalPosition = right !== undefined ? { right: this.state.right + right } : { left: this.state.left + left }; | ||
var fromLeftOrRight = right !== undefined ? { right: this.state.right + right } : { left: this.state.left + left }; | ||
var horizontalPosition = fullWidth ? { right: this.state.right + right, left: this.state.left + left } : fromLeftOrRight; | ||
return _react2.default.createElement( | ||
@@ -141,3 +144,3 @@ Comp, | ||
top: this.state.top + top | ||
}, verticalPosition) | ||
}, horizontalPosition) | ||
}, | ||
@@ -157,2 +160,3 @@ this.props.children | ||
left: _react.PropTypes.number, | ||
fullWidth: _react.PropTypes.bool, | ||
top: _react.PropTypes.number, | ||
@@ -159,0 +163,0 @@ children: _react.PropTypes.any, |
{ | ||
"name": "react-relative-portal", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "React component for place dropdowns outside overflow: hidden; elements", | ||
@@ -5,0 +5,0 @@ "main": "dist/RelativePortal.js", |
@@ -63,2 +63,3 @@ # React relative portal | ||
left: PropTypes.number, // set left offset from current position. If `right` prop is set, `left` ignores | ||
fullWidth: PropTypes.bool, // enables you to set both left and right portal positions | ||
top: PropTypes.number, // set top offset from current position | ||
@@ -65,0 +66,0 @@ children: PropTypes.any.isRequired, // portal content |
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
14742
220
80