geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
39 lines (38 loc) • 1.64 kB
JavaScript
import * as r from "react";
import { Clock4 as m } from "lucide-react";
import { convertEpochTime as i } from "./index.es157.js";
import { AvatarDemo as c } from "./index.es4.js";
import { Typography as a } from "./index.es17.js";
const u = (e) => {
const l = (t) => t ? t.split(" ").map((s) => s[0]).join("").toUpperCase() : "", o = () => {
typeof window < "u" && e?.action?.redirect_url && (window.location.href = e?.action?.redirect_url);
};
return /* @__PURE__ */ r.createElement(
"div",
{
className: "flex flex-row items-start justify-start gap-2 p-3 border-b border-neutral-1 bg-light-1 hover:cursor-pointer",
onClick: () => {
o();
},
role: "button",
onKeyDown: (t) => {
t.key === "Enter" && o();
},
tabIndex: 0
},
/* @__PURE__ */ r.createElement(
c,
{
fallback: l(e.user.first_name),
imageSrc: e.user.profile_url,
alt: l(e.user.first_name),
size: "md"
}
),
/* @__PURE__ */ r.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ r.createElement(a, { variant: "body3", className: "text-light-2 hover:underline" }, e.title), /* @__PURE__ */ r.createElement(a, { variant: "body4", className: "text-light-3" }, e.description), /* @__PURE__ */ r.createElement("div", { className: "flex flex-row gap-[6px]" }, /* @__PURE__ */ r.createElement(m, { size: 16, className: "stroke-light-2" }), /* @__PURE__ */ r.createElement(a, { variant: "body6", className: "text-light-3" }, i(Number(e.timestamp)))))
);
};
export {
u as default
};
//# sourceMappingURL=index.es148.js.map