UNPKG

geoiq-frontend-ui-kit

Version:

This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.

64 lines (63 loc) 1.85 kB
import t from "react"; import { X as v } from "lucide-react"; import { Button as l } from "./index.es7.js"; import { _Dialog as d } from "./index.es37.js"; import { Textarea as g } from "./index.es14.js"; import { Typography as u } from "./index.es17.js"; const k = ({ open: c, type: a, idx: e, callHistory: m, noteValue: n, callNotes: o, onNoteChange: s, onCallNoteChange: f, onClose: r, onSave: p }) => /* @__PURE__ */ t.createElement( d, { trigger: null, contentClassName: "h-fit w-fit", open: c, onInteractOutside: r, body: /* @__PURE__ */ t.createElement("div", { className: "p-4" }, /* @__PURE__ */ t.createElement( u, { variant: "h3", className: "mb-2 flex items-center justify-between text-light-2" }, a === "note" ? "Add notes" : `Add note for ${typeof e == "number" && m?.[e] ? m[e].name : ""}`, /* @__PURE__ */ t.createElement( v, { size: 16, className: "cursor-pointer justify-end text-light-1", onClick: r } ) ), /* @__PURE__ */ t.createElement( g, { value: a === "note" ? n : e !== void 0 && o[e] || "", placeholder: "Add notes", onChange: (i) => a === "note" ? s(i.target.value) : e !== void 0 && f(e, i.target.value), className: "h-[200px] w-[400px]" } ), /* @__PURE__ */ t.createElement("div", { className: "mt-4 flex gap-2" }, /* @__PURE__ */ t.createElement( l, { size: "sm", variant: "primary", onClick: p, disabled: a === "note" ? !n.trim() : e === void 0 || !o[e]?.trim() }, "Save" ), /* @__PURE__ */ t.createElement(l, { size: "sm", variant: "secondary", onClick: r }, "Cancel"))) } ); export { k as DialogNote }; //# sourceMappingURL=index.es137.js.map