@teknim/rjsf-mantine
Version:
Mantine theme, fields and widgets for react-jsonschema-form
13 lines • 829 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTemplate, getUiOptions, } from '@rjsf/utils';
import { Box } from '@mantine/core';
export default function FieldTemplate(props) {
const { id, classNames, style, label, errors, help, hidden, schema, uiSchema, registry, children, ...otherProps } = props;
const uiOptions = getUiOptions(uiSchema);
const WrapIfAdditionalTemplate = getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
if (hidden) {
return _jsx(Box, { display: 'none', children: children });
}
return (_jsxs(WrapIfAdditionalTemplate, { id: id, classNames: classNames, style: style, label: label, schema: schema, uiSchema: uiSchema, registry: registry, ...otherProps, children: [children, help, errors] }));
}
//# sourceMappingURL=FieldTemplate.js.map