mimir-ui-kit 1.27.3 → 1.27.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -89,7 +89,7 @@ const Steps = forwardRef(
|
|
89
89
|
const handleMouseLeave = () => {
|
90
90
|
setHoveredStep(null);
|
91
91
|
onStepMouseLeave && onStepMouseLeave();
|
92
|
-
const zone = zones.find((zone2) => zone2.to >= (step2
|
92
|
+
const zone = zones.find((zone2) => zone2.to >= (step2 || 0));
|
93
93
|
if (zone) {
|
94
94
|
setParentColor && setParentColor(zone.color);
|
95
95
|
if (fillByActualZone) {
|
@@ -60,6 +60,18 @@ const Vote = forwardRef((props, ref) => {
|
|
60
60
|
setHoveredScore(null);
|
61
61
|
};
|
62
62
|
const maxContainerWidth = resizable ? quantity * ((customSize == null ? void 0 : customSize.width) ?? StepSize[size].width) : void 0;
|
63
|
+
let showingScore;
|
64
|
+
let showingScoreBackground;
|
65
|
+
let showingScoreColor;
|
66
|
+
if (hoveredScore) {
|
67
|
+
showingScore = hoveredScore;
|
68
|
+
showingScoreBackground = currentColor;
|
69
|
+
showingScoreColor = scoreTextColor.selected;
|
70
|
+
} else {
|
71
|
+
showingScore = isZeroStep ? ZERO_VALUE : score2;
|
72
|
+
showingScoreBackground = isZeroStep ? unselectedColor : currentColor;
|
73
|
+
showingScoreColor = isZeroStep ? scoreTextColor.unselected : scoreTextColor.selected;
|
74
|
+
}
|
63
75
|
return /* @__PURE__ */ jsxs("div", { className: classNames(cls.container, rootClassName), ref, children: [
|
64
76
|
!withoutTitle && /* @__PURE__ */ jsx("p", { className: classNames(cls.title, titleClassName), children: title2 }),
|
65
77
|
/* @__PURE__ */ jsx(
|
@@ -67,10 +79,10 @@ const Vote = forwardRef((props, ref) => {
|
|
67
79
|
{
|
68
80
|
className: classNames(cls.score, scoreClassName),
|
69
81
|
style: {
|
70
|
-
backgroundColor:
|
71
|
-
color:
|
82
|
+
backgroundColor: showingScoreBackground,
|
83
|
+
color: showingScoreColor
|
72
84
|
},
|
73
|
-
children:
|
85
|
+
children: showingScore
|
74
86
|
}
|
75
87
|
),
|
76
88
|
/* @__PURE__ */ jsx(
|