Skip to content

Commit 981febd

Browse files
committed
Add plain-text to component list and textare as input
1 parent 56d1dc1 commit 981febd

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

packages/react-renderer-demo/src/app/pages/component-example.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,22 @@ class ComponentExample extends Component {
260260
);
261261
}
262262

263+
if (component === 'textarea'){
264+
return (
265+
<Grid item xs={ 12 } key={ name }>
266+
<TextField
267+
id={ name }
268+
label={ title }
269+
value={ this.state.variants[index].value || '' }
270+
onChange={ ({ target: { value }}) => this.handleExampleVariantChange(value, index) }
271+
margin="normal"
272+
fullWidth
273+
multiline
274+
/>
275+
</Grid>
276+
);
277+
}
278+
263279
return (
264280
<Grid item xs={ 12 } key={ name }>
265281
<FormGroup >

packages/react-renderer-demo/src/app/src/components/navigation/examples-definitions.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,26 @@ export const baseExamples = [{
360360
component: 'input',
361361
value: 'Checkbox',
362362
}],
363+
}, {
364+
component: componentTypes.PLAIN_TEXT,
365+
link: '?component=plain-text',
366+
linkText: 'Plain Text',
367+
ContentText: GenericComponentText,
368+
variants: [{
369+
name: 'label',
370+
title: 'Label',
371+
component: 'textarea',
372+
value: `Lorem ipsum sem velit. Mauris scelerisque tortor sed lorem dapibus, bibendum scelerisque ligula consequat. Quisque fringilla luctus.
373+
Vestibulum vulputate inceptos himenaeos.`,
374+
}],
375+
value: {
376+
fields: [{
377+
component: componentTypes.PLAIN_TEXT,
378+
name: 'plain-text-component',
379+
label: `Lorem ipsum sem velit. Mauris scelerisque tortor sed lorem dapibus, bibendum scelerisque ligula consequat. Quisque fringilla luctus.
380+
Vestibulum vulputate inceptos himenaeos.`,
381+
}],
382+
},
363383
}, {
364384
component: componentTypes.WIZARD,
365385
link: `?component=${componentTypes.WIZARD}`,

0 commit comments

Comments
 (0)