UNPKG

@aokiapp/rjsf-mantine-theme

Version:

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

14 lines (11 loc) 520 B
import { jsx } from 'react/jsx-runtime'; import { Stack, Text } from '@mantine/core'; import { errorId } from '@rjsf/utils'; function createErrors(errors, hideError, idSchema) { if (hideError || !errors || errors.length === 0) { return null; } return /* @__PURE__ */ jsx(Stack, { id: idSchema && errorId(idSchema.$id), children: errors.map((error, index) => /* @__PURE__ */ jsx(Text, { c: "red", size: "xs", children: error }, index)) }); } export { createErrors }; //# sourceMappingURL=createErrors.mjs.map