UNPKG

@datalayer/primer-rjsf

Version:

React JSON Schema Form (RJSF) for Primer

16 lines (15 loc) 503 B
import { jsx as _jsx } from "react/jsx-runtime"; import { FormControl } from "@primer/react"; import { helpId, } from "@rjsf/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(FormControl.Caption, { id: id, children: help }); }