@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.mjs CHANGED
@@ -877,14 +877,21 @@ var Popup = ({
877
877
  }
878
878
  });
879
879
  React11.useEffect(() => {
880
- setShow(open);
881
- setTimeout(() => {
882
- setShowSecondary(open);
883
- }, 500);
880
+ if (open) {
881
+ setShow(open);
882
+ setTimeout(() => {
883
+ setShowSecondary(open);
884
+ }, 500);
885
+ } else {
886
+ closeAction();
887
+ }
884
888
  }, [open]);
885
889
  const closeAction = () => {
886
- setShow(false);
887
- onClose();
890
+ setShowSecondary(false);
891
+ setTimeout(() => {
892
+ setShow(false);
893
+ onClose();
894
+ }, 300);
888
895
  };
889
896
  return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
890
897
  Modal,