summaryrefslogtreecommitdiffstats
path: root/examples/examples.js
diff options
context:
space:
mode:
authorFrancesco Cioria <firefelix@gmail.com>2017-01-20 00:38:46 +0100
committerFrancesco Cioria <firefelix@gmail.com>2017-01-22 19:02:12 +0100
commit65bda438031a7ffb92e28b4b715e33851fc4a617 (patch)
treee9d28e5591b00ba10bdfa4d8cc336f1df38b646e /examples/examples.js
parentf33ab29153b3949b42f32d7ccc1e76e832bef809 (diff)
downloadreact-autosize-textarea-65bda438031a7ffb92e28b4b715e33851fc4a617.zip
react-autosize-textarea-65bda438031a7ffb92e28b4b715e33851fc4a617.tar.gz
react-autosize-textarea-65bda438031a7ffb92e28b4b715e33851fc4a617.tar.bz2
add maxRows example
Diffstat (limited to 'examples/examples.js')
-rw-r--r--examples/examples.js10
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}