UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

28 lines (27 loc) 708 B
import { jsx as r, jsxs as s } from "react/jsx-runtime"; import { clsx as l } from "clsx"; import { useValidationErrors as m, ErrorList as n } from "../../utils/errors.js"; /* empty css */ import c from "./tooltip.js"; const g = ({ field: t = "", label: o, tooltip: e = "", children: i }) => { const { errors: d } = m(t), f = l("field-group", "offb-fieldset"); return /* @__PURE__ */ r("div", { className: f, children: /* @__PURE__ */ s("fieldset", { children: [ o && /* @__PURE__ */ s("legend", { children: [ o, e && " ", /* @__PURE__ */ r(c, { text: e }) ] }), i, /* @__PURE__ */ r(n, { errors: d }) ] }) }); }; export { g as default };