import { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema, getTemplate, getUiOptions, } from '@rjsf/utils'; import { Box } from '@mantine/core'; export default function FieldTemplate< T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any >(props: FieldTemplateProps) { const { id, classNames, style, label, errors, help, hidden, schema, uiSchema, registry, children, ...otherProps } = props; const uiOptions = getUiOptions(uiSchema); const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>( 'WrapIfAdditionalTemplate', registry, uiOptions ); if (hidden) { return {children}; } return ( {children} {help} {errors} ); }