@bytebrand/fe-ui-core 4.1.161 → 4.1.162

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.1.161",
3
+ "version": "4.1.162",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -22,6 +22,8 @@ export interface IExpansionPanelProps {
22
22
  expandedClassName?: string;
23
23
  arrowIconClassName?: string;
24
24
  expanded?: string | boolean;
25
+ vehiclesComparedCount?: number;
26
+ widthCompareBlock?: number;
25
27
  isCompare?: boolean;
26
28
  accordionSummaryClassName?: string;
27
29
  accordionClassName?: string;
@@ -52,12 +54,14 @@ class ExpansionPanel extends React.Component<IExpansionPanelProps> {
52
54
  onChange,
53
55
  expanded,
54
56
  accordionClassName,
57
+ vehiclesComparedCount,
58
+ widthCompareBlock,
55
59
  isCompare = false
56
60
  } = this.props;
57
61
 
58
62
  const scrollElementClassName = classnames(reactScrollClassName);
59
63
  const subtitleCombinedClassName = classnames(styles.subTitle, subTitleClassName);
60
-
64
+ const widthForTitle = `${vehiclesComparedCount * widthCompareBlock}px`;
61
65
  return (
62
66
  <ConditionalWrapper
63
67
  condition={reactScrollName}
@@ -75,6 +79,7 @@ class ExpansionPanel extends React.Component<IExpansionPanelProps> {
75
79
  aria-controls={title}
76
80
  className={accordionSummaryClassName}
77
81
  id={title}
82
+ sx={isCompare && { width: widthForTitle }}
78
83
  >
79
84
  <span>
80
85
  {title}