diff options
-rw-r--r-- | examples/Empty.example | 20 | ||||
-rw-r--r-- | examples/MinimumHeight.example | 20 | ||||
-rw-r--r-- | examples/Prefilled.example | 20 |
3 files changed, 60 insertions, 0 deletions
diff --git a/examples/Empty.example b/examples/Empty.example new file mode 100644 index 0000000..5b58d54 --- /dev/null +++ b/examples/Empty.example @@ -0,0 +1,20 @@ +class Example extends React.Component { + + render() { + const textareaStyle = { + padding: '10px 8px', + border: '1px solid rgba(39,41,43,.15)', + borderRadius: 4, + fontSize: 15, + width: 300 + }; + + return ( + <div> + <h2>Empty</h2> + <TextareaAutosize style={textareaStyle} placeholder='try writing some lines'/> + </div> + ); + } + +} diff --git a/examples/MinimumHeight.example b/examples/MinimumHeight.example new file mode 100644 index 0000000..989d5b9 --- /dev/null +++ b/examples/MinimumHeight.example @@ -0,0 +1,20 @@ +class Example extends React.Component { + + render() { + const textareaStyle = { + padding: '10px 8px', + border: '1px solid rgba(39,41,43,.15)', + borderRadius: 4, + fontSize: 15, + width: 300 + }; + + return ( + <div> + <h2>Minimum Height</h2> + <TextareaAutosize rows='3' style={textareaStyle} placeholder='minimun height is 3 rows'/> + </div> + ); + } + +} diff --git a/examples/Prefilled.example b/examples/Prefilled.example new file mode 100644 index 0000000..af46fcb --- /dev/null +++ b/examples/Prefilled.example @@ -0,0 +1,20 @@ +class Example extends React.Component { + + render() { + const textareaStyle = { + padding: '10px 8px', + border: '1px solid rgba(39,41,43,.15)', + borderRadius: 4, + fontSize: 15, + width: 300 + }; + + return ( + <div> + <h2>Prefilled</h2> + <TextareaAutosize style={textareaStyle} defaultValue={'this\nis\na\nlong\ninitial\ntext'}/> + </div> + ); + } + +} |