File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
packages/react-renderer-demo/src/common Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard';
29
29
import MuiWizzard from '../demo-missing-fields/mui-wizzard/wizzard' ;
30
30
import IconButton from '@material-ui/core/IconButton' ;
31
31
import CloseIcon from '@material-ui/icons/Close' ;
32
+ import TextareaAutosize from '@material-ui/core/TextareaAutosize'
32
33
33
34
import CodeEditor from './component/code-editor' ;
34
35
@@ -240,6 +241,22 @@ class ComponentExample extends Component {
240
241
) ;
241
242
}
242
243
244
+ if ( component === 'textarea' ) {
245
+ return (
246
+ < Grid item xs = { 12 } key = { name } >
247
+ < TextField
248
+ id = { name }
249
+ label = { title }
250
+ value = { this . state . variants [ index ] . value || '' }
251
+ onChange = { ( { target : { value } } ) => this . handleExampleVariantChange ( value , index ) }
252
+ margin = "normal"
253
+ fullWidth
254
+ multiline
255
+ />
256
+ </ Grid >
257
+ ) ;
258
+ }
259
+
243
260
return (
244
261
< Grid item xs = { 12 } key = { name } >
245
262
< FormGroup >
Original file line number Diff line number Diff line change @@ -349,6 +349,25 @@ export const baseExamples = [{
349
349
component : 'input' ,
350
350
value : 'Checkbox' ,
351
351
} ] ,
352
+ } , {
353
+ component : componentTypes . PLAIN_TEXT ,
354
+ linkText : 'Plain Text' ,
355
+ ContentText : GenericComponentText ,
356
+ variants : [ {
357
+ name : 'label' ,
358
+ title : 'Label' ,
359
+ component : 'textarea' ,
360
+ value : `Lorem ipsum sem velit. Mauris scelerisque tortor sed lorem dapibus, bibendum scelerisque ligula consequat. Quisque fringilla luctus.
361
+ Vestibulum vulputate inceptos himenaeos.` ,
362
+ } ] ,
363
+ value : {
364
+ fields : [ {
365
+ component : componentTypes . PLAIN_TEXT ,
366
+ name : 'plain-text-component' ,
367
+ label : `Lorem ipsum sem velit. Mauris scelerisque tortor sed lorem dapibus, bibendum scelerisque ligula consequat. Quisque fringilla luctus.
368
+ Vestibulum vulputate inceptos himenaeos.` ,
369
+ } ] ,
370
+ } ,
352
371
} , {
353
372
component : componentTypes . WIZARD ,
354
373
linkText : 'Wizard' ,
You can’t perform that action at this time.
0 commit comments