UNPKG

geoiq-frontend-ui-kit

Version:

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

95 lines (94 loc) 3.04 kB
import e, { useState as C } from "react"; import { Button as N } from "./index.es9.js"; import { Typography as i } from "./index.es19.js"; import { SheetPrimary as _ } from "./index.es41.js"; import { RequestCreditsDialog as q } from "./index.es2.js"; const I = ({ 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 }) => { const [y, t] = C(!1), E = () => { t(!0); }, v = (n, r) => { l?.(n, r), t(!1), a(); }, x = (n, r) => { m?.(n, r), t(!1), a(); }; return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement( _, { 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( N, { 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: E } )), container: typeof document < "u" ? document.getElementById(d || "") : void 0 } ), /* @__PURE__ */ e.createElement( q, { open: y, onClose: () => t(!1), onRequestCredits: v, onProceedToPayment: x, dialogClassName: p, buyCreditsOptions: h, minimumCreditsToBuy: g } )); }; export { I as CreditSheet }; //# sourceMappingURL=index.es103.js.map