UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

24 lines (22 loc) 801 B
import "../../../chunks/chunk-U5RRZUYZ.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, { shape: type, valueA: targetA?.[key], valueB: targetB?.[key] } ) }) }, key); }) }) }); } export { FieldsDiff };