@lumx/react 3.12.1-alpha.1 → 3.12.1-alpha.3

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/index.d.ts CHANGED
@@ -1928,14 +1928,14 @@ interface LinkProps extends GenericProps {
1928
1928
  isDisabled?: boolean;
1929
1929
  /**
1930
1930
  * Left icon (SVG path).
1931
- * @deprecated Just nest `<Icon />` in the children
1931
+ * @deprecated Instead, simply nest `<Icon />` in the children
1932
1932
  */
1933
1933
  leftIcon?: string;
1934
1934
  /** Custom react component for the link (can be used to inject react router Link). */
1935
1935
  linkAs?: 'a' | any;
1936
1936
  /**
1937
1937
  * Right icon (SVG path).
1938
- * @deprecated Just nest `<Icon />` in the children
1938
+ * @deprecated Instead, simply nest `<Icon />` in the children
1939
1939
  */
1940
1940
  rightIcon?: string;
1941
1941
  /** Link target. */
package/index.js CHANGED
@@ -7461,15 +7461,12 @@ const useOverflowTooltipLabel = () => {
7461
7461
  function wrapChildrenIconWithSpaces(children) {
7462
7462
  if (children === null || children === undefined) return undefined;
7463
7463
  return Children.toArray(children).flatMap(child => {
7464
- if (! /*#__PURE__*/React__default.isValidElement(child)) {
7465
- return child;
7466
- }
7467
- if (child.type === React__default.Fragment) {
7468
- return wrapChildrenIconWithSpaces(child.props.children);
7469
- }
7470
7464
  if (isComponentType(Icon)(child)) {
7471
7465
  return [' ', child, ' '];
7472
7466
  }
7467
+ if (/*#__PURE__*/React__default.isValidElement(child) && child.props && typeof child.props === 'object' && 'children' in child.props) {
7468
+ return /*#__PURE__*/React__default.cloneElement(child, undefined, wrapChildrenIconWithSpaces(child.props.children));
7469
+ }
7473
7470
  return child;
7474
7471
  });
7475
7472
  }