Skip to content

Commit 999c42e

Browse files
authored
fix(groups): do not indent groups with one element inside (#1958)
* Do not indent groups with one element inside * Update composite.tsx
1 parent 78702fc commit 999c42e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/features/composite/composite.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,12 @@ class Composite extends Component<CompositeProps & WithTranslation<'composite'>,
110110
}
111111
for (const epName in groupedFeatures) {
112112
const featuresGroup = groupedFeatures[epName];
113+
// do not indent groups with one element inside
114+
const noNeedIndent = featuresGroup.length == 1;
113115
result.push(
114116
<div key={epName}>
115117
{showEndpointLabels ? `Endpoint: ${epName}` : null}
116-
<div className="ps-4">
118+
<div className={noNeedIndent ? '' : 'ps-4'}>
117119
{featuresGroup.map((f) => (
118120
<Feature
119121
key={f.name + f.endpoint}

0 commit comments

Comments
 (0)