react-edit-text
Advanced tools
Comparing version 5.0.2 to 5.1.0
@@ -13,3 +13,3 @@ var classnames = require('classnames'); | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
_extends = Object.assign ? Object.assign.bind() : function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -27,3 +27,2 @@ var source = arguments[i]; | ||
}; | ||
return _extends.apply(this, arguments); | ||
@@ -140,3 +139,3 @@ } | ||
var EditTextareaPropTypes = _extends({}, sharedPropTypes, { | ||
rows: PropTypes__default["default"].number | ||
rows: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].oneOf(['auto'])]) | ||
}); | ||
@@ -454,3 +453,3 @@ var EditTextareaDefaultProps = _extends({}, sharedDefaultProps, { | ||
style: _extends({}, style, { | ||
height: rows * 24 + 16 + "px" | ||
height: rows === 'auto' ? 'auto' : rows * 24 + 16 + "px" | ||
}), | ||
@@ -457,0 +456,0 @@ "aria-label": "display component", |
@@ -7,3 +7,3 @@ import classnames from 'classnames'; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
_extends = Object.assign ? Object.assign.bind() : function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -21,3 +21,2 @@ var source = arguments[i]; | ||
}; | ||
return _extends.apply(this, arguments); | ||
@@ -134,3 +133,3 @@ } | ||
var EditTextareaPropTypes = _extends({}, sharedPropTypes, { | ||
rows: PropTypes.number | ||
rows: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]) | ||
}); | ||
@@ -448,3 +447,3 @@ var EditTextareaDefaultProps = _extends({}, sharedDefaultProps, { | ||
style: _extends({}, style, { | ||
height: rows * 24 + 16 + "px" | ||
height: rows === 'auto' ? 'auto' : rows * 24 + 16 + "px" | ||
}), | ||
@@ -451,0 +450,0 @@ "aria-label": "display component", |
@@ -13,3 +13,3 @@ (function (global, factory) { | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
_extends = Object.assign ? Object.assign.bind() : function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -27,3 +27,2 @@ var source = arguments[i]; | ||
}; | ||
return _extends.apply(this, arguments); | ||
@@ -140,3 +139,3 @@ } | ||
var EditTextareaPropTypes = _extends({}, sharedPropTypes, { | ||
rows: PropTypes__default["default"].number | ||
rows: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].oneOf(['auto'])]) | ||
}); | ||
@@ -454,3 +453,3 @@ var EditTextareaDefaultProps = _extends({}, sharedDefaultProps, { | ||
style: _extends({}, style, { | ||
height: rows * 24 + 16 + "px" | ||
height: rows === 'auto' ? 'auto' : rows * 24 + 16 + "px" | ||
}), | ||
@@ -457,0 +456,0 @@ "aria-label": "display component", |
{ | ||
"name": "react-edit-text", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"description": "Simple editable text component for React", | ||
@@ -49,4 +49,4 @@ "author": "Brian Min <bymi15@yahoo.com> (https://github.com/bymi15)", | ||
"@babel/eslint-parser": "^7.18.2", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/git": "^9.0.1", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/git": "^10.0.1", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
@@ -67,3 +67,3 @@ "@testing-library/react": "^12.1.5", | ||
"react-scripts": "^5.0.1", | ||
"semantic-release": "^19.0.2" | ||
"semantic-release": "^19.0.3" | ||
}, | ||
@@ -70,0 +70,0 @@ "files": [ |
@@ -95,5 +95,5 @@ <h1 align="center">React Edit Text</h1> | ||
| Prop | Type | Required | Default | Description | | ||
| ---- | ------ | -------- | ------- | ---------------------- | | ||
| rows | number | No | 3 | Number of visible rows | | ||
| Prop | Type | Required | Default | Description | | ||
| ---- | ---------------- | -------- | ------- | ---------------------- | | ||
| rows | number \| 'auto' | No | 3 | Number of visible rows | | ||
@@ -100,0 +100,0 @@ ## Contributing |
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
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
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
184653