dgz-ui-shared
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library
35 lines (34 loc) • 1.16 kB
JavaScript
import { jsxs as o, jsx as n } from "react/jsx-runtime";
import { W as d, f as m } from "./index-E1NtSoNr.es.js";
import { Button as c } from "dgz-ui/button";
import { DropdownMenu as p, DropdownMenuTrigger as u, DropdownMenuContent as h, DropdownMenuItem as f } from "dgz-ui/dropdown";
import { useTranslation as g } from "react-i18next";
const A = ({
actions: e,
triggerProps: i,
contentProps: s,
title: t
}) => {
const { t: a } = g();
return /* @__PURE__ */ o(p, { children: [
/* @__PURE__ */ n(u, { asChild: !0, className: "grow", ...i, children: /* @__PURE__ */ o(
c,
{
variant: "secondary",
size: "sm",
className: "ml-auto rounded-lg px-3",
children: [
/* @__PURE__ */ n(d, {}),
" ",
/* @__PURE__ */ n("span", { className: "hidden md:inline!", children: t || a("Actions") }),
/* @__PURE__ */ n(m, {})
]
}
) }),
/* @__PURE__ */ n(h, { align: "end", ...s, children: e.map((r, l) => /* @__PURE__ */ n(f, { onClick: () => r.onClick(), children: r.label }, l)) })
] });
};
export {
A
};
//# sourceMappingURL=Actions-Du8iQ3WR.es.js.map