diff options
author | Gabriele Petronella <gabriele@buildo.io> | 2017-01-22 19:40:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-22 19:40:57 +0100 |
commit | 82071950413385e7b9d59fc1bf177c5d937410b5 (patch) | |
tree | 5f4f0ec49f1d1209a9bddbf276a844b5825b73f8 /examples/examples.js | |
parent | c78d7c6da77031d7810f5bc5b2b0d54021b0895e (diff) | |
parent | 2925810519bf6e25cfaee94954e4858f20bb4529 (diff) | |
download | react-autosize-textarea-82071950413385e7b9d59fc1bf177c5d937410b5.zip react-autosize-textarea-82071950413385e7b9d59fc1bf177c5d937410b5.tar.gz react-autosize-textarea-82071950413385e7b9d59fc1bf177c5d937410b5.tar.bz2 |
Merge pull request #26 from buildo/25-max_rows
#25: Max Rows (closes #25)
Diffstat (limited to 'examples/examples.js')
-rw-r--r-- | examples/examples.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/examples/examples.js b/examples/examples.js index 622268d..c79bf11 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,19 @@ 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 3 "rows"</h2> + <TextareaAutosize + maxRows={3} + style={this.textareaStyle} + placeholder='maximum height is 5 rows' + defaultValue={'this\nis\na\nlong\ninitial\ntext'} + /> + <h2>Prefilled with initial value</h2> <TextareaAutosize style={this.textareaStyle} |