rjsf-antd
Version:
Ant Design theme, fields and widgets for react-jsonschema-form
17 lines • 815 B
JavaScript
import { __assign, __rest } from "tslib";
// remove this once https://github.com/rjsf-team/react-jsonschema-form/issues/1405 is resolved
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import Form from 'react-jsonschema-form';
function withTheme(themeProps) {
return forwardRef(function (_a, ref) {
var fields = _a.fields, widgets = _a.widgets, directProps = __rest(_a, ["fields", "widgets"]);
return (React.createElement(Form, __assign({}, themeProps, directProps, { fields: __assign(__assign({}, themeProps.fields), fields), widgets: __assign(__assign({}, themeProps.widgets), widgets), ref: ref })));
});
}
withTheme.propTypes = {
widgets: PropTypes.object,
fields: PropTypes.object
};
export default withTheme;
//# sourceMappingURL=withTheme.js.map