UNPKG

dgz-ui-shared

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library

37 lines (36 loc) 1.3 kB
import { jsxs as e, jsx as r } from "react/jsx-runtime"; import { Z as d, f as p } from "./index-E1NtSoNr.es.js"; import { Button as c } from "dgz-ui/button"; import { DropdownMenu as u, DropdownMenuTrigger as f, DropdownMenuContent as h, DropdownMenuItem as x } from "dgz-ui/dropdown"; import { useTranslation as g } from "react-i18next"; import { S as w } from "./Spin-DtW_edOq.es.js"; const k = ({ options: o, loading: a = !1, triggerProps: t, contentProps: i, title: s }) => { const { t: m } = g(); return /* @__PURE__ */ e(u, { children: [ /* @__PURE__ */ r(f, { asChild: !0, ...t, className: "grow", children: /* @__PURE__ */ e( c, { variant: "secondary", size: "sm", className: "ml-auto rounded-lg px-3", children: [ a ? /* @__PURE__ */ r(w, { className: "text-item-primary" }) : /* @__PURE__ */ r(d, {}), " ", /* @__PURE__ */ r("span", { className: "hidden md:inline!", children: s || m("Export") }), /* @__PURE__ */ r(p, {}) ] } ) }), /* @__PURE__ */ r(h, { align: "end", ...i, children: o.map((n, l) => /* @__PURE__ */ r(x, { onClick: () => n.onClick(), children: n.label }, l)) }) ] }); }; export { k as E }; //# sourceMappingURL=ExportData-CwotVgye.es.js.map