@transferwise/components 0.0.0-experimental-5931a60 → 0.0.0-experimental-a44fd6f
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/build/index.mjs
CHANGED
|
@@ -4867,13 +4867,20 @@ function InlineAlert({
|
|
|
4867
4867
|
return null;
|
|
4868
4868
|
}
|
|
4869
4869
|
};
|
|
4870
|
-
const hasTextChildren =
|
|
4870
|
+
const hasTextChildren = content => {
|
|
4871
4871
|
let label = '';
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4872
|
+
const fillLabel = childrenNodes => {
|
|
4873
|
+
React__default.Children.map(childrenNodes, child => {
|
|
4874
|
+
if (typeof child === 'string') {
|
|
4875
|
+
label += child;
|
|
4876
|
+
}
|
|
4877
|
+
if (typeof child === 'object' && /*#__PURE__*/React__default.isValidElement(child)) {
|
|
4878
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4879
|
+
fillLabel(child?.props?.children);
|
|
4880
|
+
}
|
|
4881
|
+
});
|
|
4882
|
+
};
|
|
4883
|
+
fillLabel(content);
|
|
4877
4884
|
return !!label.length;
|
|
4878
4885
|
};
|
|
4879
4886
|
return /*#__PURE__*/jsxs("div", {
|