gomtm 0.0.366 → 0.0.367

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,3 +2,4 @@
2
2
  export default function CurdViewEditor(props: {
3
3
  name: string;
4
4
  }): import("react").JSX.Element;
5
+ export declare const CurdViewContentField: () => import("react").JSX.Element;
@@ -21,7 +21,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
21
  import { jsx, jsxs } from "react/jsx-runtime";
22
22
  import { FormControl, FormField, FormItem, FormLabel, FormMessage } from "mtxuilib/ui/form";
23
23
  import { Input } from "mtxuilib/ui/input";
24
- import { useFormContext } from "react-hook-form";
24
+ import { useForm, useFormContext } from "react-hook-form";
25
25
  import { FormShell } from "../../curd/form/FormShell";
26
26
  function CurdViewEditor(props) {
27
27
  const form = useFormContext();
@@ -69,9 +69,23 @@ function CurdViewEditor(props) {
69
69
  /* @__PURE__ */ jsx(FormLabel, { children: "methodUpdate" }),
70
70
  /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "methodUpdate" }, field)) }),
71
71
  /* @__PURE__ */ jsx(FormMessage, {})
72
- ] }) })
72
+ ] }) }),
73
+ /* @__PURE__ */ jsx(CurdViewContentField, {})
73
74
  ] });
74
75
  }
76
+ const CurdViewContentField = () => {
77
+ const form = useFormContext();
78
+ const contentForm = useForm();
79
+ return /* @__PURE__ */ jsxs("div", { children: [
80
+ "CurdViewContentField",
81
+ /* @__PURE__ */ jsx(FormField, { control: contentForm.control, name: "someField", render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
82
+ /* @__PURE__ */ jsx(FormLabel, { children: "someField" }),
83
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "someField" }, field)) }),
84
+ /* @__PURE__ */ jsx(FormMessage, {})
85
+ ] }) })
86
+ ] });
87
+ };
75
88
  export {
89
+ CurdViewContentField,
76
90
  CurdViewEditor as default
77
91
  };