summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco <firefelix@gmail.com>2015-06-19 13:44:46 +0200
committerFrancesco <firefelix@gmail.com>2015-06-19 13:44:46 +0200
commitf2d1a4388f8282523b4d07e49e41e4a230733c61 (patch)
treed17ddeb60381b49ea8c18628b8bd9bf70b8557ea
parentb0ab36d96c51db8836d503946444c79692c9f8e6 (diff)
downloadreact-autosize-textarea-f2d1a4388f8282523b4d07e49e41e4a230733c61.zip
react-autosize-textarea-f2d1a4388f8282523b4d07e49e41e4a230733c61.tar.gz
react-autosize-textarea-f2d1a4388f8282523b4d07e49e41e4a230733c61.tar.bz2
Update README.md
-rw-r--r--README.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/README.md b/README.md
index ad84bd6..404d19d 100644
--- a/README.md
+++ b/README.md
@@ -7,11 +7,11 @@ A light replacement for built-in textarea component which automaticaly adjusts i
This module is based on the very popular autosize script written by Jack Moore. Check its website [here](http://www.jacklmoore.com/autosize/) for more documentation.
```
-var Textarea = require('react-autosize-textarea');
+var TextareaAutosize = require('react-autosize-textarea');
React.renderComponent(
<div>
- <Textarea></Textarea>
+ <TextareaAutosize {...textareaProps} onResize={() => {}} />
</div>,
document.body);
```
@@ -21,6 +21,14 @@ React.renderComponent(
npm install --save react-autosize-textarea
```
+###API
+You can pass any props you're allowed to use with default React textarea (valueLink too).
+
+You can also pass the callback **onResize** which will be triggered at any resize:
+```
+onResize: React.PropTypes.func
+```
+
###Browser Compatibility
| Chrome | Firefox | IE | Safari | Android |
| ------------- | ------------- | ----- | ------ | ------- |