@aokiapp/rjsf-mantine-theme
Version:
Mantine theme, fields and widgets for react-jsonschema-form
13 lines • 800 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Alert, List } from '@mantine/core';
import { TranslatableString } from '@rjsf/utils';
import { IconZoomExclamation } from '@tabler/icons-react';
/** 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, { title: translateString(TranslatableString.ErrorsLabel), icon: _jsx(IconZoomExclamation, {}), children: _jsx(List, { size: 'sm', children: errors.map((error, index) => (_jsx(List.Item, { children: error.stack }, `error-${index}`))) }) }));
}
//# sourceMappingURL=ErrorListTemplate.js.map