UNPKG

@aokiapp/rjsf-mantine-theme

Version:

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

15 lines 1.11 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { descriptionId, getTemplate } from '@rjsf/utils'; /** The `NullWidget` is the template to use to render a null widget * It is not present in the original library. * * @param props - The `WidgetProps` for this component */ export default function NullWidget(props) { const { id, label, hideLabel, required, options, schema, className, registry } = props; const TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, options); const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, options); const description = options.description || schema.description; return (_jsxs("div", { className: `armt-widget-null ${className || ''}`, id: id, children: [label && !hideLabel && (_jsx(TitleFieldTemplate, { id: id, title: label, required: required, schema: schema, registry: registry })), description && !hideLabel && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, registry: registry, schema: schema }))] })); } //# sourceMappingURL=NullWidget.js.map