@micromag/element-share-options 0.3.779 → 0.3.783
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 +3 -2
- package/package.json +4 -3
package/es/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
+
import isArray from 'lodash/isArray';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
6
7
|
import React, { useState, useCallback, useMemo } from 'react';
|
|
7
8
|
import { FormattedMessage } from 'react-intl';
|
|
@@ -244,7 +245,7 @@ var ShareOptions = function ShareOptions(_ref) {
|
|
|
244
245
|
style: finalStyles
|
|
245
246
|
}), /*#__PURE__*/React.createElement(TwitterIcon, shareIconProps), /*#__PURE__*/React.createElement("div", {
|
|
246
247
|
className: classNames([styles.label, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
247
|
-
}, "Twitter"), /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
}, "X (Twitter)"), /*#__PURE__*/React.createElement("div", {
|
|
248
249
|
className: styles.spacer,
|
|
249
250
|
style: {
|
|
250
251
|
width: "".concat(iconSize, "px")
|
|
@@ -364,7 +365,7 @@ var ShareOptions = function ShareOptions(_ref) {
|
|
|
364
365
|
}))
|
|
365
366
|
}];
|
|
366
367
|
var hasShareLink = options !== null ? options.includes('copylink') : true; // default is true
|
|
367
|
-
var selectedOptions = options !== null ? shareOptions.filter(function (opt) {
|
|
368
|
+
var selectedOptions = options !== null && isArray(options) ? shareOptions.filter(function (opt) {
|
|
368
369
|
return options.includes(opt.id);
|
|
369
370
|
}) : shareOptions;
|
|
370
371
|
return /*#__PURE__*/React.createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-share-options",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.783",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -63,8 +63,9 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@babel/runtime": "^7.13.10",
|
|
66
|
-
"@micromag/core": "^0.3.
|
|
66
|
+
"@micromag/core": "^0.3.781",
|
|
67
67
|
"classnames": "^2.2.6",
|
|
68
|
+
"lodash": "^4.17.21",
|
|
68
69
|
"prop-types": "^15.7.2",
|
|
69
70
|
"react-intl": "^6.6.4",
|
|
70
71
|
"react-share": "^5.1.0",
|
|
@@ -74,5 +75,5 @@
|
|
|
74
75
|
"access": "public",
|
|
75
76
|
"registry": "https://registry.npmjs.org/"
|
|
76
77
|
},
|
|
77
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "e79f1240a3d905de33eb3dd873b772c11b6ebdb0"
|
|
78
79
|
}
|