summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}