v0.6.10
This commit is contained in:
@@ -889,7 +889,7 @@ const Wa = (e, t, n, a) => Se.redirect(n, t, a), Ka = (e, t = {}, n, a = {}) =>
|
||||
const $ = (D, pe = !1) => (f(D), !D && w("hover"), D ? l == null ? void 0 : l(C) : s == null ? void 0 : s(pe)), _ = (D) => {
|
||||
f(!0), w("click");
|
||||
};
|
||||
return g(Jn, { zIndex: B, placement: E, onPopupClick: _, onClick: _, open: h, align: F, arrow: M, trigger: u, getPopupContainer: I || T ? void 0 : (D) => D, styles: { body: { padding: 0 } }, content: g(Ga, { ...z, extras: c, children: v && S.cloneElement(v, { ...C, $close: (D) => $(!1, D) }) }), children: p, onOpenChange: $ });
|
||||
return g(Jn, { zIndex: B, placement: E, onPopupClick: _, onClick: _, open: h, align: F, arrow: M, trigger: u, getPopupContainer: I || T ? void 0 : (D) => D, content: g(Ga, { ...z, extras: c, children: v && S.cloneElement(v, { ...C, $close: (D) => $(!1, D) }) }), children: p, onOpenChange: $ });
|
||||
}, Ga = ({ title: e, className: t, classNames: n, children: a, extras: i, width: r, height: o, ...s }) => {
|
||||
const [l, p] = A({}), c = G((u, w) => p((C) => ({ ...C, [u]: w })), []), d = G((u) => p((w) => ({ ...w, [u]: void 0 })), []), h = e ? S.createElement("div", { className: "ff-popup-title" }, e) : l == null ? void 0 : l.title, f = i ?? S.createElement("div", { className: "ff-popup-reserved-extras" }, i);
|
||||
return g(Ke.Provider, { value: { ele: l, mount: c, unmount: d }, children: O("div", { className: R("ff-popup ff-popover", t, l.rootClassName), style: { width: r ?? 260, height: o }, ...s, children: [O("div", { className: R("ff-popup-header", "ff-popover-header", n == null ? void 0 : n.header), children: [h, l == null ? void 0 : l["sub-title"]] }), g("div", { className: R("ff-popup-body", "ff-popover-body", n == null ? void 0 : n.body), children: a }), O("div", { className: R("ff-popup-footer", "ff-popover-footer", n == null ? void 0 : n.footer), children: [f, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) });
|
||||
Reference in New Issue
Block a user