@micromag/element-call-to-action 0.3.112 → 0.3.117
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/es/index.js +2 -1
- package/lib/index.js +3 -1
- package/package.json +6 -6
package/es/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { isValidUrl, getStyleFromColor, isIos } from '@micromag/core/utils';
|
|
|
11
11
|
import Button from '@micromag/element-button';
|
|
12
12
|
import Text from '@micromag/element-text';
|
|
13
13
|
import WebView from '@micromag/element-webview';
|
|
14
|
+
import isString from 'lodash/isString';
|
|
14
15
|
|
|
15
16
|
var propTypes$1 = {
|
|
16
17
|
color: PropTypes.string,
|
|
@@ -185,7 +186,7 @@ function CallToAction(_ref) {
|
|
|
185
186
|
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'click';
|
|
186
187
|
|
|
187
188
|
if (trackEvent !== null) {
|
|
188
|
-
trackEvent('call_to_action', action, url);
|
|
189
|
+
trackEvent('call_to_action', isString(action) ? action : 'click', url);
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
if (onClick !== null) {
|
package/lib/index.js
CHANGED
|
@@ -13,6 +13,7 @@ var utils = require('@micromag/core/utils');
|
|
|
13
13
|
var Button = require('@micromag/element-button');
|
|
14
14
|
var Text = require('@micromag/element-text');
|
|
15
15
|
var WebView = require('@micromag/element-webview');
|
|
16
|
+
var isString = require('lodash/isString');
|
|
16
17
|
|
|
17
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
19
|
|
|
@@ -25,6 +26,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
25
26
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
26
27
|
var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
|
|
27
28
|
var WebView__default = /*#__PURE__*/_interopDefaultLegacy(WebView);
|
|
29
|
+
var isString__default = /*#__PURE__*/_interopDefaultLegacy(isString);
|
|
28
30
|
|
|
29
31
|
var propTypes$1 = {
|
|
30
32
|
color: PropTypes__default["default"].string,
|
|
@@ -199,7 +201,7 @@ function CallToAction(_ref) {
|
|
|
199
201
|
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'click';
|
|
200
202
|
|
|
201
203
|
if (trackEvent !== null) {
|
|
202
|
-
trackEvent('call_to_action', action, url);
|
|
204
|
+
trackEvent('call_to_action', isString__default["default"](action) ? action : 'click', url);
|
|
203
205
|
}
|
|
204
206
|
|
|
205
207
|
if (onClick !== null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-call-to-action",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.117",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
|
-
"@micromag/core": "^0.3.
|
|
56
|
-
"@micromag/element-button": "^0.3.
|
|
57
|
-
"@micromag/element-text": "^0.3.
|
|
58
|
-
"@micromag/element-webview": "^0.3.
|
|
55
|
+
"@micromag/core": "^0.3.117",
|
|
56
|
+
"@micromag/element-button": "^0.3.117",
|
|
57
|
+
"@micromag/element-text": "^0.3.117",
|
|
58
|
+
"@micromag/element-webview": "^0.3.117",
|
|
59
59
|
"@react-spring/core": "^9.1.1",
|
|
60
60
|
"@react-spring/web": "^9.1.1",
|
|
61
61
|
"@use-gesture/react": "^10.2.4",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "eab1c9a0b8c19d747fee6472158779f33b1f18d3"
|
|
72
72
|
}
|