@lumx/react 3.12.1-alpha.1 → 3.12.1-alpha.2
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.js +3 -6
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/link/Link.test.tsx +15 -5
- package/src/components/text/Text.test.tsx +9 -29
- package/src/utils/react/wrapChildrenIconWithSpaces.test.tsx +10 -13
- package/src/utils/react/wrapChildrenIconWithSpaces.tsx +8 -8
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
|
}
|