@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 +27 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/notice-control.tsx +12 -5
package/dist/index.js
CHANGED
|
@@ -692,24 +692,37 @@ var NoticeControl = createControl(
|
|
|
692
692
|
});
|
|
693
693
|
};
|
|
694
694
|
const handleActionClick = () => {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
markNoticeAsDismissedInSession(dismissible);
|
|
695
|
+
if (!dismissible) {
|
|
696
|
+
return;
|
|
698
697
|
}
|
|
698
|
+
setIsDismissed(true);
|
|
699
|
+
markNoticeAsDismissedInSession(dismissible);
|
|
699
700
|
};
|
|
700
|
-
return /* @__PURE__ */ React13.createElement(
|
|
701
|
-
import_ui6.
|
|
701
|
+
return /* @__PURE__ */ React13.createElement(
|
|
702
|
+
import_ui6.Alert,
|
|
702
703
|
{
|
|
703
|
-
variant: "
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
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
|
-
|
|
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
|
|