UNPKG

react-forminate

Version:

React.js + Typescript package that creates dynamic UI forms based on the JSON schema

21 lines (20 loc) 495 B
import { a as n, j as r } from "./index-BPZpMa2Y.js"; import { I as m } from "./FieldComponents-Fikvpz9O.js"; import u from "react"; const d = (t) => { const { eventHandlers: s, fieldParams: a, fieldValue: o, fieldErrors: i, hasDefaultStyling: l } = n(t), e = { ...a, ...s.htmlHandlers, value: o ?? "" }; return l ? /* @__PURE__ */ r.jsx(m, { ...e, hasError: !!i }) : /* @__PURE__ */ r.jsx("input", { ...e }); }, x = u.memo(d); export { x as default };