UNPKG

@astarte-platform/react-bootstrap

Version:

React Bootstrap theme, fields and widgets for react-jsonschema-form, powered by react-bootstrap, this is a package from a fork of official project

16 lines 599 B
import { jsx as _jsx } from "react/jsx-runtime"; import { helpId } from '@rjsf/utils'; 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 { idSchema, help, hasErrors } = props; if (!help) { return null; } const id = helpId(idSchema); return (_jsx(Form.Text, { className: hasErrors ? 'text-danger' : 'text-muted', id: id, children: help })); } //# sourceMappingURL=FieldHelpTemplate.js.map