UNPKG

@rjsf/antd

Version:

Ant Design theme, fields and widgets for react-jsonschema-form

15 lines 614 B
import { jsx as _jsx } from "react/jsx-runtime"; import { errorId } from '@rjsf/utils'; /** The `FieldErrorTemplate` component renders the errors local to the particular field * * @param props - The `FieldErrorProps` for the errors being rendered */ export default function FieldErrorTemplate(props) { const { errors = [], idSchema } = props; if (errors.length === 0) { return null; } const id = errorId(idSchema); return (_jsx("div", { id: id, children: errors.map((error) => (_jsx("div", { children: error }, `field-${id}-error-${error}`))) })); } //# sourceMappingURL=index.js.map