@rjsf/react-bootstrap
Version:
React Bootstrap theme, fields and widgets for react-jsonschema-form, powered by react-bootstrap
16 lines • 711 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { helpId } from '@rjsf/utils';
import { RichHelp } from '@rjsf/core';
import Form from 'react-bootstrap/Form';
/** 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, hasErrors } = props;
if (!help) {
return null;
}
return (_jsx(Form.Text, { id: helpId(fieldPathId), className: hasErrors ? 'text-danger' : 'text-muted', children: _jsx(RichHelp, { help: help, registry: registry, uiSchema: uiSchema }) }));
}
//# sourceMappingURL=FieldHelpTemplate.js.map