UNPKG

geoiq-frontend-ui-kit

Version:

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

97 lines (96 loc) 3.08 kB
import e, { useState as N } from "react"; import { Button as _ } from "./index9.es.js"; import { Typography as i } from "./index19.es.js"; import { SheetPrimary as q } from "./index42.es.js"; import { RequestCreditsDialog as P } from "./index2.es.js"; const S = ({ open: o, onClose: a, credit_details: c = "0", description: s, onRequestCredits: l, onProceedToPayment: m, trigger: f = null, containerId: d, className: u, dialogClassName: p, buyCreditsOptions: h, minimumCreditsToBuy: g, requestOnly: y }) => { const [E, t] = N(!1), v = () => { t(!0); }, x = (n, r) => { l?.(n, r), t(!1), a(); }, C = (n, r) => { m?.(n, r), t(!1), a(); }; return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement( q, { open: o, trigger: f, onOpenChange: a, title: "Credits", contentProps: { className: u, side: "custom" }, bodyProps: { className: "p-0 h-full" }, content: /* @__PURE__ */ e.createElement("div", { className: "flex flex-col items-center justify-center h-full p-6" }, /* @__PURE__ */ e.createElement("div", { className: "flex-col items-center justify-center" }, /* @__PURE__ */ e.createElement( "img", { src: "https://frontend-static-files.geoiq.io/strapi/Group_8faa24a1c9/Group_8faa24a1c9.svg", alt: "Credit information", className: "w-[280px] h-[120px] object-contain" } ), /* @__PURE__ */ e.createElement("div", { className: "mt-2 flex justify-center" }, /* @__PURE__ */ e.createElement(i, { variant: "h2", className: "flex items-center mb-4" }, c, /* @__PURE__ */ e.createElement( "img", { src: "https://frontend-static-files.geoiq.io/strapi/Credit_Icon_e6fcaf6845/Credit_Icon_e6fcaf6845.svg", width: 32, height: 32, alt: "coin icon", className: "ml-1" } )), s && /* @__PURE__ */ e.createElement(i, { variant: "body1", className: "text-light-3" }, s)))), footer: /* @__PURE__ */ e.createElement("div", { className: "flex w-full justify-center" }, /* @__PURE__ */ e.createElement( _, { variant: "primary", suffixIcon: /* @__PURE__ */ e.createElement( "img", { src: "https://frontend-static-files.geoiq.io/strapi/navbar_credits_247858e26a.svg", width: 16, height: 16, alt: "coin icon", className: "ml-1" } ), title: "Request for credits", onClick: v } )), container: typeof document < "u" ? document.getElementById(d || "") : void 0 } ), /* @__PURE__ */ e.createElement( P, { open: E, onClose: () => t(!1), onRequestCredits: x, onProceedToPayment: C, dialogClassName: p, buyCreditsOptions: h, minimumCreditsToBuy: g, requestOnly: y } )); }; export { S as CreditSheet }; //# sourceMappingURL=index104.es.js.map