import { FieldTemplateProps, FormContextType, getTemplate, getUiOptions, RJSFSchema, StrictRJSFSchema, } from '@snups/rjsf-utils'; import { Label } from '../util'; export default function FieldTemplate< T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any, >(props: FieldTemplateProps) { const { children, errors, help, displayLabel, description, rawDescription, hidden, uiSchema, registry } = props; const uiOptions = getUiOptions(uiSchema); const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>( 'WrapIfAdditionalTemplate', registry, uiOptions, ); if (hidden) { return
{children}
; } return (
{displayLabel &&
); }