UNPKG

@rjsf/core

Version:

A simple React component capable of building HTML forms out of a JSON schema.

15 lines (14 loc) 582 B
import { jsx as _jsx } from "react/jsx-runtime"; import { helpId } from '@rjsf/utils'; import RichHelp from '../RichHelp.js'; /** The `FieldHelpTemplate` component renders any help desired for a field * * @param props - The `FieldHelpProps` to be rendered */ export default function FieldHelpTemplate(props) { const { fieldPathId, help, uiSchema, registry } = props; if (!help) { return null; } return (_jsx("div", { id: helpId(fieldPathId), className: 'help-block', children: _jsx(RichHelp, { help: help, registry: registry, uiSchema: uiSchema }) })); }