alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
22 lines (20 loc) • 1.08 kB
JavaScript
import "../../chunks/chunk-U5RRZUYZ.js";
// src/input/object/ObjectField.browser.tsx
import { Field } from "alinea/core";
import { FormRow } from "alinea/dashboard/atoms/FormAtoms";
import { InputForm } from "alinea/dashboard/editor/InputForm";
import { useFieldOptions } from "alinea/dashboard/editor/UseField";
import { InputLabel } from "alinea/dashboard/view/InputLabel";
import { Sink } from "alinea/ui/Sink";
import { IcRoundFeed } from "alinea/ui/icons/IcRoundFeed";
import { object as createObject } from "./ObjectField.js";
export * from "./ObjectField.js";
import { jsx } from "react/jsx-runtime";
var object = Field.provideView(ObjectInput, createObject);
function ObjectInput({ field }) {
const options = useFieldOptions(field);
return /* @__PURE__ */ jsx(InputLabel, { ...options, icon: IcRoundFeed, children: /* @__PURE__ */ jsx(Sink.Root, { children: /* @__PURE__ */ jsx(Sink.Content, { children: /* @__PURE__ */ jsx(FormRow, { field, type: options.fields, children: /* @__PURE__ */ jsx(InputForm, { type: options.fields }) }) }) }) });
}
export {
object
};