UNPKG

geoiq-frontend-ui-kit

Version:

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

48 lines (47 loc) 1.28 kB
import * as e from "react"; import { ButtonVariants as E, TitleVariants as N } from "./index.es68.js"; import { Loader2 as y } from "lucide-react"; import { Slot as b } from "@radix-ui/react-slot"; import { Typography as h } from "./index.es17.js"; import { cn as o } from "./index.es79.js"; const w = e.forwardRef( ({ className: n, variant: l, size: t, title: a, suffixIcon: s, prefixIcon: c, asChild: i = !1, loading: r, id: f, disabled: p, ...m }, d) => { const u = i ? b : "button"; return /* @__PURE__ */ e.createElement( u, { className: o(E({ variant: l, size: t, className: n })), id: f, ref: d, disabled: r || p, ...m }, r ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(y, { className: "w-4 h-4 mr-2 animate-spin" }), "Please wait...") : a ? /* @__PURE__ */ e.createElement("div", { className: "flex items-center" }, c, /* @__PURE__ */ e.createElement( h, { className: o(N({ size: t })), variant: "body1" }, a ), s) : m.children ); } ); w.displayName = "Button"; export { w as Button, E as ButtonVariants }; //# sourceMappingURL=index.es7.js.map