@e-group/material-form
Version:
Custom react components for integrate redux-form.
28 lines (27 loc) • 1.25 kB
TypeScript
export default SchemaFields;
/**
* A simple React component capable of building HTML forms out of a JSON schema and using material ui by default.
* To understand json schema https://json-schema.org/learn/getting-started-step-by-step.html.
* Inspired by https://react-jsonschema-form.readthedocs.io/en/latest/#styling-your-forms.
*/
declare function SchemaFields({ schema, renderField, isRequiredError, atLeastOneIsRequiredError }: {
schema: any;
renderField: any;
isRequiredError: any;
atLeastOneIsRequiredError: any;
}): any[];
declare namespace SchemaFields {
namespace propTypes {
const schema: PropTypes.Validator<PropTypes.InferProps<{
title: PropTypes.Requireable<string>;
description: PropTypes.Requireable<string>;
type: PropTypes.Validator<string>;
required: PropTypes.Requireable<(string | null | undefined)[]>;
properties: PropTypes.Validator<object>;
}>>;
const renderField: PropTypes.Requireable<(...args: any[]) => any>;
const isRequiredError: PropTypes.Requireable<(...args: any[]) => any>;
const atLeastOneIsRequiredError: PropTypes.Requireable<(...args: any[]) => any>;
}
}
import PropTypes from "prop-types";