nope/resources/ui/forms/dynamicForm.tsx
Martin Karkowski 39adf1faea Moving Files
2020-09-07 10:27:10 +02:00

24 lines
471 B
TypeScript

// https://react-jsonschema-form.readthedocs.io/en/latest/
import Form from "@rjsf/bootstrap-4";
const schema = {
"type": "object",
"properties": {
"hello": {
"type": "string"
}
},
"required": [
"hello"
]
};
const formData = "a";
const log = (type) => console.log.bind(console, type);
export default () => (
<Form schema={schema} formData={formData} liveValidate onSubmit={log("submitted")}>
</Form>
);