diff options
author | Francesco Cioria <firefelix@gmail.com> | 2017-01-20 00:38:46 +0100 |
---|---|---|
committer | Francesco Cioria <firefelix@gmail.com> | 2017-01-22 19:02:12 +0100 |
commit | 65bda438031a7ffb92e28b4b715e33851fc4a617 (patch) | |
tree | e9d28e5591b00ba10bdfa4d8cc336f1df38b646e | |
parent | f33ab29153b3949b42f32d7ccc1e76e832bef809 (diff) | |
download | react-autosize-textarea-65bda438031a7ffb92e28b4b715e33851fc4a617.zip react-autosize-textarea-65bda438031a7ffb92e28b4b715e33851fc4a617.tar.gz react-autosize-textarea-65bda438031a7ffb92e28b4b715e33851fc4a617.tar.bz2 |
add maxRows example
-rw-r--r-- | examples/examples.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/examples.js b/examples/examples.js index 622268d..2a5bea0 100644 --- a/examples/examples.js +++ b/examples/examples.js @@ -5,6 +5,7 @@ import TextareaAutosize from '../src/TextareaAutosize'; class Example extends React.Component { textareaStyle = { + width: 300, padding: '10px 8px', border: '1px solid rgba(39, 41, 43, .15)', borderRadius: 4, @@ -27,11 +28,18 @@ class Example extends React.Component { <h2>Minimum height is 3 "rows"</h2> <TextareaAutosize - rows='3' + rows={3} style={this.textareaStyle} placeholder='minimun height is 3 rows' /> + <h2>Maximum height is 5 "rows"</h2> + <TextareaAutosize + maxRows={5} + style={this.textareaStyle} + placeholder='maximum height is 5 rows' + /> + <h2>Prefilled with initial value</h2> <TextareaAutosize style={this.textareaStyle} |