next-recomponents 2.0.14 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
- package/src/modal/index.tsx +6 -2
package/dist/index.js
CHANGED
|
@@ -37126,9 +37126,14 @@ function Modal({
|
|
|
37126
37126
|
(0, import_react10.useEffect)(() => {
|
|
37127
37127
|
pop.updateMessage(children);
|
|
37128
37128
|
}, [children]);
|
|
37129
|
+
const props = children == null ? void 0 : children.props;
|
|
37130
|
+
const onClick = props == null ? void 0 : props.onClick;
|
|
37129
37131
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
37130
37132
|
(0, import_react10.cloneElement)(button, {
|
|
37131
|
-
onClick: () =>
|
|
37133
|
+
onClick: (e) => {
|
|
37134
|
+
onClick == null ? void 0 : onClick(e);
|
|
37135
|
+
pop.modal(children, color, false, true);
|
|
37136
|
+
}
|
|
37132
37137
|
}),
|
|
37133
37138
|
pop.PopupComponent
|
|
37134
37139
|
] });
|
package/dist/index.mjs
CHANGED
|
@@ -37112,9 +37112,14 @@ function Modal({
|
|
|
37112
37112
|
useEffect6(() => {
|
|
37113
37113
|
pop.updateMessage(children);
|
|
37114
37114
|
}, [children]);
|
|
37115
|
+
const props = children == null ? void 0 : children.props;
|
|
37116
|
+
const onClick = props == null ? void 0 : props.onClick;
|
|
37115
37117
|
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
37116
37118
|
cloneElement2(button, {
|
|
37117
|
-
onClick: () =>
|
|
37119
|
+
onClick: (e) => {
|
|
37120
|
+
onClick == null ? void 0 : onClick(e);
|
|
37121
|
+
pop.modal(children, color, false, true);
|
|
37122
|
+
}
|
|
37118
37123
|
}),
|
|
37119
37124
|
pop.PopupComponent
|
|
37120
37125
|
] });
|
package/package.json
CHANGED
package/src/modal/index.tsx
CHANGED
|
@@ -28,11 +28,15 @@ export default function Modal({
|
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
pop.updateMessage(children);
|
|
30
30
|
}, [children]);
|
|
31
|
-
|
|
31
|
+
const props = children?.props;
|
|
32
|
+
const onClick = props?.onClick;
|
|
32
33
|
return (
|
|
33
34
|
<>
|
|
34
35
|
{cloneElement(button, {
|
|
35
|
-
onClick: () =>
|
|
36
|
+
onClick: (e) => {
|
|
37
|
+
onClick?.(e as any);
|
|
38
|
+
pop.modal(children, color, false, true);
|
|
39
|
+
},
|
|
36
40
|
})}
|
|
37
41
|
{pop.PopupComponent}
|
|
38
42
|
</>
|