Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Form schemas #1370

Open
justinmchase opened this issue Jun 14, 2021 · 0 comments
Open

Feature Request: Form schemas #1370

justinmchase opened this issue Jun 14, 2021 · 0 comments

Comments

@justinmchase
Copy link

It may be asking for a lot but it would be super sweet if the forms could be auto-generated based on a Json Schema object being passed in.

Something like:

import * as React from "react"
import { Form, Input, Button } from "@operational/components"
const schema = {
  type: "object",
  properties: {
    firstName: { type: "string" },
    lastName: { type: "string" }
  }
}
const data = {
  firstName = 'Justin',
  lastName = 'Chase'
}
;<Form schema={schema} data={data}>
</Form>

And that would render a form with the appropriate fields.

There is a project already that does this react-jsonschema-form, perhaps its just a matter of bundling it and adding a custom theme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant