@micromag/element-link 0.3.733 → 0.3.742

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.
Files changed (2) hide show
  1. package/es/index.js +3 -5
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -2,8 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
3
3
  import classNames from 'classnames';
4
4
  import PropTypes from 'prop-types';
5
- import React, { useMemo } from 'react';
6
- import { v1 } from 'uuid';
5
+ import React, { useId } from 'react';
7
6
  import { PropTypes as PropTypes$1 } from '@micromag/core';
8
7
  import { getStyleFromMargin } from '@micromag/core/utils';
9
8
 
@@ -42,9 +41,8 @@ var Link = function Link(_ref) {
42
41
  if (margin !== null) {
43
42
  finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromMargin(margin));
44
43
  }
45
- var id = useMemo(function () {
46
- return finalStyle !== null ? "link-component-".concat(v1()) : null;
47
- }, [finalStyle !== null]);
44
+ var uniqueId = useId();
45
+ var id = finalStyle !== null ? "link-component-".concat(uniqueId) : null;
48
46
  var _ref2 = external ? {
49
47
  target: '_blank',
50
48
  rel: 'noopener noreferer'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-link",
3
- "version": "0.3.733",
3
+ "version": "0.3.742",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.733",
62
+ "@micromag/core": "^0.3.742",
63
63
  "classnames": "^2.2.6",
64
64
  "prop-types": "^15.7.2",
65
65
  "react-intl": "^6.6.4",
@@ -69,5 +69,5 @@
69
69
  "access": "public",
70
70
  "registry": "https://registry.npmjs.org/"
71
71
  },
72
- "gitHead": "9dae26b19bddd5767d8c65c62aad0e51d5a90680"
72
+ "gitHead": "6d91233414c1db0bd803e405210418d05064714c"
73
73
  }