UNPKG

xtreme-ui

Version:

Collection of reusable components that can be used in web projects

60 lines (59 loc) 1.67 kB
"use client"; import { jsxs as s, jsx as e } from "react/jsx-runtime"; import { forwardRef as f } from "react"; import r from "clsx"; import { Button as c } from "../../base/Button/Button.js"; import { Icon as y } from "../../base/Icon/Icon.js"; import { useXData as h } from "../../context/useContext.js"; /* empty css */ const x = f((l, d) => { const { className: t, children: m, title: n, icon: i, primaryButtonProps: o = {}, secondaryButtonProps: a = {} } = l, { setSiderMode: p } = h(), N = r( "xtrSiderModal", t ); return /* @__PURE__ */ s( "div", { ref: d, className: N, role: "dialog", children: [ /* @__PURE__ */ s("div", { className: "header", children: [ /* @__PURE__ */ e(c, { className: "back", icon: "f053", onClick: () => p("closed") }), i && /* @__PURE__ */ e(y, { code: i, type: "duotone" }), /* @__PURE__ */ e("p", { className: "title", children: n }) ] }), /* @__PURE__ */ e("div", { className: "body", children: m }), /* @__PURE__ */ s("div", { className: "footer", children: [ /* @__PURE__ */ e( c, { type: "primary", ...o, className: r("primaryButton", o == null ? void 0 : o.className) } ), /* @__PURE__ */ e( c, { type: "secondary", ...a, className: r("secondaryButton", a == null ? void 0 : a.className) } ) ] }) ] } ); }); x.displayName = "SiderModal"; export { x as SiderModal };