@micromag/element-quote 0.3.732 → 0.3.736

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 { LinkStyle, HighlightStyle } from '@micromag/core/components';
9
8
  import { getStyleFromLink, getStyleFromHighlight, getStyleFromText, getStyleFromMargin } from '@micromag/core/utils';
@@ -53,9 +52,8 @@ var Quote = function Quote(_ref) {
53
52
  if (linksStyle !== null) {
54
53
  finalLinkStyle = _objectSpread(_objectSpread({}, finalLinkStyle), getStyleFromText(linksStyle));
55
54
  }
56
- var id = useMemo(function () {
57
- return finalLinkStyle !== null ? "quote-component-".concat(v1()) : null;
58
- }, [finalLinkStyle !== null]);
55
+ var uniqueId = useId();
56
+ var id = finalLinkStyle !== null ? "quote-component-".concat(uniqueId) : null;
59
57
  return /*#__PURE__*/React.createElement(React.Fragment, null, finalLinkStyle !== null ? /*#__PURE__*/React.createElement(LinkStyle, {
60
58
  selector: "#".concat(id),
61
59
  style: finalLinkStyle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-quote",
3
- "version": "0.3.732",
3
+ "version": "0.3.736",
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.732",
62
+ "@micromag/core": "^0.3.736",
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": "5cb81184739b8b84d734bf2cdf5ae070562ab1dc"
72
+ "gitHead": "77bd0bf6941418463c0f7bbb68bf9b20379c5c55"
73
73
  }