react-autosize-textarea
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -5,2 +5,9 @@ # Change Log | ||
## [v3.0.3](https://github.com/buildo/react-autosize-textarea/tree/v3.0.3) (2018-04-11) | ||
[Full Changelog](https://github.com/buildo/react-autosize-textarea/compare/v3.0.2...v3.0.3) | ||
#### Fixes (bugs & defects): | ||
- Changing number of rows doesn't update styles [#100](https://github.com/buildo/react-autosize-textarea/issues/100) | ||
## [v3.0.2](https://github.com/buildo/react-autosize-textarea/tree/v3.0.2) (2018-01-22) | ||
@@ -7,0 +14,0 @@ [Full Changelog](https://github.com/buildo/react-autosize-textarea/compare/v3.0.1...v3.0.2) |
@@ -45,1 +45,23 @@ ### Examples | ||
``` | ||
#### Styled components | ||
```js | ||
const StyledTextarea = styled(TextareaAutosize)` | ||
font-size: ${({ theme }) => theme.textarea.fontSize}; | ||
border-color: ${({ theme }) => theme.textarea.borderColor}; | ||
resize: none; | ||
box-sizing: border-box; | ||
width: 100%; | ||
`; | ||
<StyledTextarea | ||
defaultValue='Church-key flannel bicycle rights, tofu tacos before they sold out polaroid for free' | ||
theme={{ | ||
textarea: { | ||
fontSize: '18px', | ||
borderColor: 'green' | ||
} | ||
}} | ||
/> | ||
``` |
@@ -336,3 +336,3 @@ /// <reference types="react" /> | ||
render(): JSX.Element; | ||
componentDidUpdate(): void; | ||
componentDidUpdate(prevProps: TextareaAutosize.Props): void; | ||
} |
@@ -105,4 +105,4 @@ "use strict"; | ||
}; | ||
TextareaAutosize.prototype.componentDidUpdate = function () { | ||
if (this.props.value !== this.currentValue) { | ||
TextareaAutosize.prototype.componentDidUpdate = function (prevProps) { | ||
if (this.props.value !== this.currentValue || this.props.rows !== prevProps.rows) { | ||
this.dispatchEvent(UPDATE); | ||
@@ -109,0 +109,0 @@ } |
{ | ||
"name": "react-autosize-textarea", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "replacement for built-in textarea which auto resizes itself", | ||
@@ -54,3 +54,3 @@ "main": "lib", | ||
"jest": "^21.2.1", | ||
"node-sass": "4.5.2", | ||
"node-sass": "^4.8.3", | ||
"progress-bar-webpack-plugin": "^1.10.0", | ||
@@ -66,2 +66,3 @@ "raw-loader": "^0.5.1", | ||
"smooth-release": "^8.0.0", | ||
"styled-components": "^3.2.5", | ||
"ts-jest": "^21.2.3", | ||
@@ -68,0 +69,0 @@ "ts-loader": "^2.3.3", |
@@ -0,1 +1,5 @@ | ||
import styled from 'styled-components'; | ||
(global as any).styled = styled; | ||
import '../examples/examples.scss'; |
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
49743
589
27