@astarte-platform/react-bootstrap
Version:
React Bootstrap theme, fields and widgets for react-jsonschema-form, powered by react-bootstrap, this is a package from a fork of official project
11 lines • 801 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Card from 'react-bootstrap/Card';
import ListGroup from 'react-bootstrap/ListGroup';
import { TranslatableString } from '@rjsf/utils';
export default function ErrorList({ errors, registry, }) {
const { translateString } = registry;
return (_jsxs(Card, { border: 'danger', className: 'mb-4', children: [_jsx(Card.Header, { className: 'alert-danger', children: translateString(TranslatableString.ErrorsLabel) }), _jsx(Card.Body, { className: 'p-0', children: _jsx(ListGroup, { children: errors.map((error, i) => {
return (_jsx(ListGroup.Item, { className: 'border-0', children: _jsx("span", { children: error.stack }) }, i));
}) }) })] }));
}
//# sourceMappingURL=ErrorList.js.map