xtreme-ui
Version:
Collection of reusable components that can be used in web projects
28 lines (27 loc) • 1.36 kB
JavaScript
"use client";
import { jsxs as e, jsx as o } from "react/jsx-runtime";
import s from "clsx";
import { Icon as f } from "gliff";
import { forwardRef as y } from "react";
import { Button as r } from "../../base/Button/Button.js";
import { useXData as u } from "../../context/useContext.js";
import './siderModal.css';/* empty css */
const x = y((i, l) => {
const { className: d, children: m, title: n, icon: a, primaryButtonProps: t = {}, secondaryButtonProps: c = {} } = i, { setSiderMode: p } = u(), N = s("xtrSiderModal", d);
return /* @__PURE__ */ e("div", { ref: l, className: N, role: "dialog", children: [
/* @__PURE__ */ e("div", { className: "header", children: [
/* @__PURE__ */ o(r, { className: "back", icon: "f053", onClick: () => p("closed") }),
a && /* @__PURE__ */ o(f, { className: "xIcon", code: a, set: "duotone" }),
/* @__PURE__ */ o("p", { className: "title", children: n })
] }),
/* @__PURE__ */ o("div", { className: "body", children: m }),
/* @__PURE__ */ e("div", { className: "footer", children: [
/* @__PURE__ */ o(r, { type: "primary", ...t, className: s("primaryButton", t?.className) }),
/* @__PURE__ */ o(r, { type: "secondary", ...c, className: s("secondaryButton", c?.className) })
] })
] });
});
x.displayName = "SiderModal";
export {
x as SiderModal
};