@thecb/components 8.3.1-beta.6 → 8.3.1-beta.8

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/dist/index.cjs.js CHANGED
@@ -19853,8 +19853,8 @@ var StyledInternalLink = styled__default( /*#__PURE__*/React.forwardRef(function
19853
19853
  var margin = _ref7.margin;
19854
19854
  return margin;
19855
19855
  }, function (_ref8) {
19856
- var match = _ref8.match;
19857
- return match ? INFO_BLUE : 'transparent';
19856
+ var matchesCurrentRoute = _ref8.matchesCurrentRoute;
19857
+ return matchesCurrentRoute ? INFO_BLUE : 'transparent';
19858
19858
  }, function (_ref9) {
19859
19859
  var hoverColor = _ref9.hoverColor;
19860
19860
  return hoverColor;
@@ -21513,11 +21513,12 @@ _curry2(function test(pattern, str) {
21513
21513
 
21514
21514
  var URL_TEST = /(([a-z]{3,6}:\/\/)|(^|\s))([a-zA-Z0-9\-]+\.)+[a-z]{2,13}[\.\?\=\&\%\/\w\-]*\b([^@]|$)/;
21515
21515
 
21516
- var _excluded$m = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
21516
+ var _excluded$m = ["url", "matchesCurrentRoute", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
21517
21517
 
21518
21518
  var ButtonWithLink = function ButtonWithLink(_ref) {
21519
21519
  var _ref$url = _ref.url,
21520
21520
  url = _ref$url === void 0 ? "/" : _ref$url,
21521
+ _ref$matchesCurrentRo = _ref.matchesCurrentRoute,
21521
21522
  _ref$disabled = _ref.disabled,
21522
21523
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21523
21524
  _ref$fileLink = _ref.fileLink,
@@ -21532,12 +21533,11 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21532
21533
  var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
21533
21534
  var children = _ref2.children,
21534
21535
  url = _ref2.url,
21536
+ matchesCurrentRoute = _ref2.matchesCurrentRoute,
21535
21537
  disabled = _ref2.disabled,
21536
21538
  newTab = _ref2.newTab,
21537
21539
  dataQa = _ref2.dataQa,
21538
21540
  extraStyles = _ref2.extraStyles;
21539
- var match = reactRouterDom.useMatch();
21540
- console.log("🚀 ~ file: ButtonWithLink.js:32 ~ match:", match);
21541
21541
 
21542
21542
  if (disabled) {
21543
21543
  return safeChildren(children, /*#__PURE__*/React__default.createElement("span", null));
@@ -21551,7 +21551,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21551
21551
  dataQa: dataQa
21552
21552
  }, safeChildren(children, /*#__PURE__*/React__default.createElement("span", null))) : /*#__PURE__*/React__default.createElement(InternalLink, {
21553
21553
  to: url,
21554
- match: match,
21554
+ matchesCurrentRoute: matchesCurrentRoute,
21555
21555
  tabIndex: "-1",
21556
21556
  dataQa: dataQa,
21557
21557
  extraStyles: extraStyles