@lonli-lokli/dynamic-forms-mui
Version:
Material UI 5 theme, fields and widgets for react-jsonschema-form
16 lines • 607 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import FormHelperText from '@mui/material/FormHelperText/index.js';
import { helpId, } from '@lonli-lokli/dynamic-forms-utils';
/** 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 } = props;
if (!help) {
return null;
}
const id = helpId(idSchema);
return (_jsx(FormHelperText, { component: 'div', id: id, children: help }));
}
//# sourceMappingURL=FieldHelpTemplate.js.map