Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

npm version Tweet Twitter Follow

Data Driven Form logo

Parsers for Data Driven Forms.

📖 For more information please visit the documentation. 📖

Table of Contents

Installation

$ npm install @data-driven-forms/parsers -S
$ yarn add @data-driven-forms/parsers

Usage

THIS REPO IS NOT CURRENTLY MAINTAINED, IF YOU WANT TO USE IT, PLEASE LET US KNOW

For using Data Driven Forms in your component you need the renderer and a component mapper, which provides formFields components and layoutFields components.

import React from 'react';
import { FormRenderer, componentTypes } from '@data-driven-forms/react-form-renderer';
import { componentMapper, FormTemplate } from '@data-driven-forms/pf4-component-mapper';

import { mozilla } from '@data-driven-forms/parsers';

const mozillaSchema = [
  "namespace": "myapi",
  "properties": {
    "SOME_PROPERTY": {
     "value": 24,
     "description": "Description of my property here."
    }
  }
]

const parsedSchema = mozilla(mozillaSchema)

const Form = () => (
  <FormRenderer
    schema={parsedSchema}
    componentMapper={componentMapper}
    FormTemplate={FormTemplate}
    onSubmit={console.log}
  />
)

More information

For more information please check the root repository or our documentation page.

LICENSE

Apache License 2.0