UNPKG

@rjsf/core

Version:

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

14 lines (13 loc) 596 B
import { jsx as _jsx } from "react/jsx-runtime"; import RichDescription from '../RichDescription.js'; /** The `DescriptionField` is the template to use to render the description of a field * * @param props - The `DescriptionFieldProps` for this component */ export default function DescriptionField(props) { const { id, description, registry, uiSchema } = props; if (!description) { return null; } return (_jsx("div", { id: id, className: 'field-description', children: _jsx(RichDescription, { description: description, registry: registry, uiSchema: uiSchema }) })); }