UNPKG

geoiq-frontend-ui-kit

Version:

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

30 lines (29 loc) 2.12 kB
import e from "react"; import { AccordionDemo as s } from "./index.es2.js"; import { Typography as t } from "./index.es17.js"; import { PhoneIncoming as o, PhoneOutgoing as g, PenLine as d } from "lucide-react"; const h = ({ callHistory: r, onEditCallNote: n }) => r.length > 0 ? /* @__PURE__ */ e.createElement( s, { trigger: /* @__PURE__ */ e.createElement(t, { variant: "body1", className: "text-light-2" }, "Call history"), content: /* @__PURE__ */ e.createElement("div", { className: "flex flex-col gap-2" }, r.map((a, m) => { const i = new Date(a.time), l = i.toLocaleDateString("en-GB"), c = i.toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" }); return /* @__PURE__ */ e.createElement("div", { key: m, className: "flex items-start justify-between py-2" }, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(t, { variant: "body4", className: "text-light-3" }, a.name), /* @__PURE__ */ e.createElement("div", { className: "mt-1 flex items-center gap-1" }, a.type === "Incoming" ? /* @__PURE__ */ e.createElement(o, { size: 16, className: "text-light-4" }) : /* @__PURE__ */ e.createElement(g, { size: 16, className: "text-light-4" }), /* @__PURE__ */ e.createElement(t, { variant: "body6", className: "text-light-4" }, a.type))), /* @__PURE__ */ e.createElement("div", { className: "flex content-center items-center gap-2" }, /* @__PURE__ */ e.createElement("div", { className: "flex flex-col items-end" }, /* @__PURE__ */ e.createElement(t, { variant: "body6", className: "text-light-3" }, l), /* @__PURE__ */ e.createElement(t, { variant: "body6", className: "text-light-3" }, c)), n && /* @__PURE__ */ e.createElement( t, { className: "mt-2 w-fit cursor-pointer rounded-md border border-neutral-2 p-1", onClick: () => n(m) }, /* @__PURE__ */ e.createElement(d, { size: 16, className: "text-light-1" }) ))); })), triggerProps: { className: "cursor-pointer my-2" } } ) : null; export { h as CallHistorySection }; //# sourceMappingURL=index.es135.js.map