react-notify-sdk 1.0.52 → 1.0.54

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.
@@ -25,6 +25,8 @@ const FeatureMessage = ({ message, onDismiss }) => {
25
25
  };
26
26
  // Handle click with tracking
27
27
  const handleClick = async (e) => {
28
+ e.preventDefault();
29
+ e.stopPropagation();
28
30
  // Don't trigger if clicking close button
29
31
  if (e.target.closest('[data-dismiss-button]')) {
30
32
  return;
@@ -115,7 +117,7 @@ const FeatureMessage = ({ message, onDismiss }) => {
115
117
  :
116
118
  _jsx("button", {
117
119
  //data-dismiss-button
118
- type: 'button', style: {
120
+ type: 'button', onClick: message?.click_action ? handleClick : undefined, style: {
119
121
  width: "20%", // w-1/5
120
122
  height: "1rem", // h-4 (16px)
121
123
  marginTop: "auto", // my-auto
@@ -127,6 +129,6 @@ const FeatureMessage = ({ message, onDismiss }) => {
127
129
  fontSize: "1rem", // text-base
128
130
  color: `${message?.textColor}`,
129
131
  cursor: "pointer"
130
- }, onClick: message?.click_action ? handleClick : undefined, onMouseEnter: (e) => (e.currentTarget.style.color = `${message?.borderColor}`), onMouseLeave: (e) => (e.currentTarget.style.color = `${message?.textColor}`), children: `${filterButton(message)}` }) })] }));
132
+ }, onMouseEnter: (e) => (e.currentTarget.style.color = `${message?.borderColor}`), onMouseLeave: (e) => (e.currentTarget.style.color = `${message?.textColor}`), children: `${filterButton(message)}` }) })] }));
131
133
  };
132
134
  export default FeatureMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-notify-sdk",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "description": "SDK for displaying real-time route-specific messages in React apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",