@redsift/design-system 7.4.0-alpha.3 → 7.4.1
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 +1 -1
- package/index.js +7 -3
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1474,7 +1474,7 @@ declare const Pill: Comp<PillProps, HTMLDivElement>;
|
|
|
1474
1474
|
*/
|
|
1475
1475
|
interface DetailedCardSectionItemProps extends ComponentProps<'div'> {
|
|
1476
1476
|
/** Description */
|
|
1477
|
-
description?: string;
|
|
1477
|
+
description?: string | ReactElement;
|
|
1478
1478
|
/**
|
|
1479
1479
|
* Icon path data (`d` property of the `path` SVG element).<br />
|
|
1480
1480
|
* See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
|
package/index.js
CHANGED
|
@@ -4715,10 +4715,11 @@ const DEFAULT_PROPS$8 = {
|
|
|
4715
4715
|
};
|
|
4716
4716
|
const hasCollapsibleChildren = children => {
|
|
4717
4717
|
let hasCollapsible = false;
|
|
4718
|
-
React.Children.
|
|
4718
|
+
const childrenArray = React.Children.toArray(children);
|
|
4719
|
+
for (const child of childrenArray) {
|
|
4719
4720
|
if (isComponent(DetailedCardSection)(child)) {
|
|
4720
4721
|
let hasCollapsibleItems = Boolean(child.isCollapsible);
|
|
4721
|
-
React.Children.
|
|
4722
|
+
React.Children.forEach(child.props.children, sectionChild => {
|
|
4722
4723
|
if (isComponent(DetailedCardCollapsibleSectionItems)(sectionChild)) {
|
|
4723
4724
|
hasCollapsibleItems = true;
|
|
4724
4725
|
}
|
|
@@ -4727,7 +4728,10 @@ const hasCollapsibleChildren = children => {
|
|
|
4727
4728
|
} else if (isComponent(DetailedCardCollapsibleSectionItems)(child)) {
|
|
4728
4729
|
hasCollapsible = true;
|
|
4729
4730
|
}
|
|
4730
|
-
|
|
4731
|
+
if (hasCollapsible) {
|
|
4732
|
+
break;
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4731
4735
|
return hasCollapsible;
|
|
4732
4736
|
};
|
|
4733
4737
|
|