@elementor/editor-controls 4.4.0-1144 → 4.4.0-1145

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
@@ -692,24 +692,37 @@ var NoticeControl = createControl(
692
692
  });
693
693
  };
694
694
  const handleActionClick = () => {
695
- setIsDismissed(true);
696
- if (dismissible) {
697
- markNoticeAsDismissedInSession(dismissible);
695
+ if (!dismissible) {
696
+ return;
698
697
  }
698
+ setIsDismissed(true);
699
+ markNoticeAsDismissedInSession(dismissible);
699
700
  };
700
- return /* @__PURE__ */ React13.createElement(import_ui6.Alert, { variant: "outlined", severity, icon, size: "small", onClose: handleDismiss }, heading && /* @__PURE__ */ React13.createElement(NoticeTitle, null, heading), /* @__PURE__ */ React13.createElement(import_ui6.Typography, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content), buttonText && buttonUrl && /* @__PURE__ */ React13.createElement(
701
- import_ui6.AlertAction,
701
+ return /* @__PURE__ */ React13.createElement(
702
+ import_ui6.Alert,
702
703
  {
703
- variant: "contained",
704
- color: severity,
705
- target: "_blank",
706
- rel: "noopener noreferrer",
707
- href: buttonUrl,
708
- onClick: handleActionClick,
709
- sx: { mt: 2 }
704
+ variant: "outlined",
705
+ severity,
706
+ icon,
707
+ size: "small",
708
+ onClose: dismissible ? handleDismiss : void 0
710
709
  },
711
- buttonText
712
- ));
710
+ heading && /* @__PURE__ */ React13.createElement(NoticeTitle, null, heading),
711
+ /* @__PURE__ */ React13.createElement(import_ui6.Typography, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content),
712
+ buttonText && buttonUrl && /* @__PURE__ */ React13.createElement(
713
+ import_ui6.AlertAction,
714
+ {
715
+ variant: "contained",
716
+ color: severity,
717
+ target: "_blank",
718
+ rel: "noopener noreferrer",
719
+ href: buttonUrl,
720
+ onClick: handleActionClick,
721
+ sx: { mt: 2 }
722
+ },
723
+ buttonText
724
+ )
725
+ );
713
726
  }
714
727
  );
715
728