UNPKG

@aokiapp/rjsf-mantine-theme

Version:

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

14 lines 599 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Stack, Text } from '@mantine/core'; import { errorId } from '@rjsf/utils'; /** * Create error components from errors array */ export function createErrors(errors, hideError, // it's okay to pass undefined here, but do not omit it idSchema) { if (hideError || !errors || errors.length === 0) { return null; } return (_jsx(Stack, { id: idSchema && errorId(idSchema.$id), children: errors.map((error, index) => (_jsx(Text, { c: 'red', size: 'xs', children: error }, index))) })); } //# sourceMappingURL=createErrors.js.map