UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

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