UNPKG

@rjsf/semantic-ui

Version:

Semantic UI theme, fields and widgets for react-jsonschema-form

12 lines 760 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Message } from 'semantic-ui-react'; import { TranslatableString } from '@rjsf/utils'; /** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form` * * @param props - The `ErrorListProps` for this component */ export default function ErrorList({ errors, registry, }) { const { translateString } = registry; return (_jsxs(Message, { negative: true, children: [_jsx(Message.Header, { children: translateString(TranslatableString.ErrorsLabel) }), _jsx(Message.List, { children: errors.map((error, index) => (_jsx(Message.Item, { children: error.stack }, `error-${index}`))) })] })); } //# sourceMappingURL=ErrorList.js.map