UNPKG

alinea

Version:
25 lines (23 loc) 821 B
import "../../../chunks/chunk-NZLE2WMY.js"; // src/dashboard/view/diff/FieldsDiff.tsx import { InputLabel } from "alinea/dashboard/view/InputLabel"; import { VStack } from "alinea/ui"; import { Lift } from "alinea/ui/Lift"; import { FieldDiff } from "./FieldDiff.js"; import { jsx } from "react/jsx-runtime"; function FieldsDiff({ changes, targetA, targetB }) { return /* @__PURE__ */ jsx(Lift, { children: /* @__PURE__ */ jsx(VStack, { gap: 10, children: changes.map(([key, type], i) => { return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(InputLabel, { label: type.label, children: /* @__PURE__ */ jsx( FieldDiff, { FieldsDiff, shape: type, valueA: targetA?.[key], valueB: targetB?.[key] } ) }) }, key); }) }) }); } export { FieldsDiff };