@hoddy-ui/next 2.0.18 → 2.0.20

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
@@ -918,14 +918,21 @@ var Popup = ({
918
918
  }
919
919
  });
920
920
  import_react11.default.useEffect(() => {
921
- setShow(open);
922
- setTimeout(() => {
923
- setShowSecondary(open);
924
- }, 500);
921
+ if (open) {
922
+ setShow(open);
923
+ setTimeout(() => {
924
+ setShowSecondary(open);
925
+ }, 500);
926
+ } else {
927
+ closeAction();
928
+ }
925
929
  }, [open]);
926
930
  const closeAction = () => {
927
- setShow(false);
928
- onClose();
931
+ setShowSecondary(false);
932
+ setTimeout(() => {
933
+ setShow(false);
934
+ onClose();
935
+ }, 300);
929
936
  };
930
937
  return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement(
931
938
  import_react_native11.Modal,