@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.mjs CHANGED
@@ -558,24 +558,37 @@ var NoticeControl = createControl(
558
558
  });
559
559
  };
560
560
  const handleActionClick = () => {
561
- setIsDismissed(true);
562
- if (dismissible) {
563
- markNoticeAsDismissedInSession(dismissible);
561
+ if (!dismissible) {
562
+ return;
564
563
  }
564
+ setIsDismissed(true);
565
+ markNoticeAsDismissedInSession(dismissible);
565
566
  };
566
- return /* @__PURE__ */ React13.createElement(Alert, { variant: "outlined", severity, icon, size: "small", onClose: handleDismiss }, heading && /* @__PURE__ */ React13.createElement(NoticeTitle, null, heading), /* @__PURE__ */ React13.createElement(Typography, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content), buttonText && buttonUrl && /* @__PURE__ */ React13.createElement(
567
- AlertAction,
567
+ return /* @__PURE__ */ React13.createElement(
568
+ Alert,
568
569
  {
569
- variant: "contained",
570
- color: severity,
571
- target: "_blank",
572
- rel: "noopener noreferrer",
573
- href: buttonUrl,
574
- onClick: handleActionClick,
575
- sx: { mt: 2 }
570
+ variant: "outlined",
571
+ severity,
572
+ icon,
573
+ size: "small",
574
+ onClose: dismissible ? handleDismiss : void 0
576
575
  },
577
- buttonText
578
- ));
576
+ heading && /* @__PURE__ */ React13.createElement(NoticeTitle, null, heading),
577
+ /* @__PURE__ */ React13.createElement(Typography, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content),
578
+ buttonText && buttonUrl && /* @__PURE__ */ React13.createElement(
579
+ AlertAction,
580
+ {
581
+ variant: "contained",
582
+ color: severity,
583
+ target: "_blank",
584
+ rel: "noopener noreferrer",
585
+ href: buttonUrl,
586
+ onClick: handleActionClick,
587
+ sx: { mt: 2 }
588
+ },
589
+ buttonText
590
+ )
591
+ );
579
592
  }
580
593
  );
581
594