Skip to content

Commit d603c34

Browse files
committed
Fixed wrong example at landing page.
1 parent c5b0ae9 commit d603c34

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/react-renderer-demo/src/components/landing-page-cards.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ const value = `import React from 'react';
1111
import FormRenderer, { componentTypes } from '@data-driven-forms/react-form-renderer';
1212
import { formFieldsMapper, layoutMapper } from '@data-driven-forms/pf4-component-mapper';
1313
14-
const schema = [{
15-
component: componentTypes.TEXT_FIELD,
16-
name: 'name',
17-
label: 'Your name'
18-
}]
14+
const schema = {
15+
fields: [{
16+
component: componentTypes.TEXT_FIELD,
17+
name: 'name',
18+
label: 'Your name'
19+
}]
20+
}
1921
2022
const Form = () => (
2123
<FormRenderer
24+
schema={schema}
2225
formFieldsMapper={formFieldsMapper}
2326
layoutMapper={layoutMapper}
2427
onSubmit={console.log}

0 commit comments

Comments
 (0)