import { FieldTemplateProps, FormContextType, getTemplate, getUiOptions, RJSFSchema, StrictRJSFSchema, } from '@rjsf/utils'; import Form from 'react-bootstrap/Form'; export default function FieldTemplate< T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any >({ id, children, displayLabel, rawErrors = [], errors, help, description, rawDescription, classNames, style, disabled, label, hidden, onDropPropertyClick, onKeyChange, readonly, required, schema, uiSchema, registry, }: FieldTemplateProps) { const uiOptions = getUiOptions(uiSchema); const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>( 'WrapIfAdditionalTemplate', registry, uiOptions ); if (hidden) { return
{children}
; } return ( {displayLabel && ( 0 ? 'text-danger' : ''}> {label} {required ? '*' : null} )} {children} {displayLabel && rawDescription && ( 0 ? 'text-danger' : 'text-muted'}>{description} )} {errors} {help} ); }