UNPKG

@teknim/rjsf-mantine

Version:

Mantine theme, fields and widgets for react-jsonschema-form

13 lines 870 B
import { jsx as _jsx } from "react/jsx-runtime"; import { TranslatableString } from '@rjsf/utils'; import { Alert, Title, List } from '@mantine/core'; import { ExclamationCircle } from './icons'; /** 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 (_jsx(Alert, { color: 'red', variant: 'transparent', title: _jsx(Title, { order: 5, fw: 'normal', children: translateString(TranslatableString.ErrorsLabel) }), icon: _jsx(ExclamationCircle, {}), children: _jsx(List, { children: errors.map((error, index) => (_jsx(List.Item, { c: 'red', children: error.stack }, `error-${index}`))) }) })); } //# sourceMappingURL=ErrorList.js.map