Skip to content

Commit 41afb22

Browse files
authored
Merge pull request #125 from rvsia/fix-readme
Fixes readme and demo inconsistencies
2 parents f35a7d9 + dab899e commit 41afb22

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,17 @@ import React from 'react';
9595
import FormRenderer, { componentTypes } from '@data-driven-forms/react-form-renderer';
9696
import { formFieldsMapper, layoutMapper } from '@data-driven-forms/pf4-component-mapper';
9797

98-
const schema = [{
99-
component: componentTypes.TEXT_FIELD,
100-
name: 'name',
101-
label: 'Your name'
102-
}]
98+
const schema = {
99+
fields: [{
100+
component: componentTypes.TEXT_FIELD,
101+
name: 'name',
102+
label: 'Your name'
103+
}]
104+
}
103105

104106
const Form = () => (
105107
<FormRenderer
108+
schema={schema}
106109
formFieldsMapper={formFieldsMapper}
107110
layoutMapper={layoutMapper}
108111
onSubmit={console.log}

packages/react-renderer-demo/src/components/footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const Footer = ({ open }) => {
8989
<div>
9090
<Typography variant="h5">Contribution</Typography>
9191
<Typography>
92-
Please report any bugs, mistakes, suggestions and don't forget to contribute to the Data driven forms repository.
92+
Please report any bugs, mistakes, suggestions and don't forget to contribute to the data-driven-forms/react-forms repository.
9393
</Typography>
9494
</div>
9595
</Paper>

packages/react-renderer-demo/src/pages/landing-page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ const LandingPage = () => {
4242
<div className={ classes.landingPageContainer }>
4343
<LandingPageTitle />
4444
<Typography className={ classes.landingPageText }>
45-
React form renderer is a component designed for ManageIQ and Red Hat Cloud Services projects that takes
46-
json form definitions and renders them into react components.
45+
Data Driven Forms is a component designed for ManageIQ and Red&nbsp;Hat&nbsp;Cloud&nbsp;Services projects that takes
46+
JSON form definitions and renders them into react components.
4747
</Typography>
4848
<div className={ classes.getStartedLink }>
4949
<Link to="/renderer/installation" style={{ textDecoration: 'none' }}>

0 commit comments

Comments
 (0)