UNPKG

dgz-ui-shared

Version:

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

47 lines (46 loc) 1.38 kB
import { jsxs as o, jsx as a } from "react/jsx-runtime"; import { Dialog as d, DialogTrigger as h, DialogContent as w, DialogHeader as g, DialogTitle as p, DialogDescription as D, DialogFooter as s } from "dgz-ui/dialog"; import { cn as u } from "dgz-ui/utils"; const T = ({ header: t, footer: x, trigger: m, children: r, size: l = "lg", className: e, triggerProps: n, contentProps: c, ...i }) => /* @__PURE__ */ o(d, { ...i, children: [ m && /* @__PURE__ */ a(h, { asChild: !0, ...n, children: m }), /* @__PURE__ */ o( w, { className: u( "data-[state=open]:animate-contentShowTop top-4 bottom-auto max-h-[calc(100vh-2rem)] max-w-lg translate-y-0 overflow-y-auto", l === "xl" && "max-w-xl", l === "2xl" && "max-w-2xl", l === "3xl" && "max-w-3xl", l === "4xl" && "max-w-5xl", l === "5xl" && "max-w-5xl", l === "6xl" && "max-w-6xl", l === "7xl" && "max-w-7xl", l === "full" && "max-w-[95%]", e ), ...c, children: [ /* @__PURE__ */ o(g, { children: [ /* @__PURE__ */ a(p, { className: "mb-0", children: t }), /* @__PURE__ */ a(D, { className: "hidden" }) ] }), r, x && /* @__PURE__ */ a(s, { children: x }) ] } ) ] }); export { T as MyModal }; //# sourceMappingURL=index.es.js.map