@faasjs/ant-design 0.0.2-beta.369 → 0.0.2-beta.370

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 CHANGED
@@ -435,7 +435,12 @@ Form.Item = FormItem;
435
435
  var import_antd6 = require("antd");
436
436
  var import_react8 = require("react");
437
437
  function useModal(init) {
438
- const [props, setProps] = (0, import_react8.useState)(init);
438
+ const [props, setProps] = (0, import_react8.useState)(__spreadValues({
439
+ visible: false,
440
+ onCancel: () => setProps((prev) => __spreadProps(__spreadValues({}, prev), {
441
+ visible: false
442
+ }))
443
+ }, init));
439
444
  return {
440
445
  modal: /* @__PURE__ */ import_react.default.createElement(import_antd6.Modal, __spreadValues({}, props)),
441
446
  modalProps: props,
package/dist/index.mjs CHANGED
@@ -410,7 +410,12 @@ Form.Item = FormItem;
410
410
  import { Modal } from "antd";
411
411
  import { useState as useState5 } from "react";
412
412
  function useModal(init) {
413
- const [props, setProps] = useState5(init);
413
+ const [props, setProps] = useState5(__spreadValues({
414
+ visible: false,
415
+ onCancel: () => setProps((prev) => __spreadProps(__spreadValues({}, prev), {
416
+ visible: false
417
+ }))
418
+ }, init));
414
419
  return {
415
420
  modal: /* @__PURE__ */ React.createElement(Modal, __spreadValues({}, props)),
416
421
  modalProps: props,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.2-beta.369",
3
+ "version": "0.0.2-beta.370",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -28,7 +28,7 @@
28
28
  "lodash": "*",
29
29
  "react": "*",
30
30
  "react-dom": "*",
31
- "@faasjs/react": "^0.0.2-beta.369",
31
+ "@faasjs/react": "^0.0.2-beta.370",
32
32
  "react-use": "*",
33
33
  "react-router-dom": "*"
34
34
  },