kupos-ui-components-lib 10.4.21 → 10.4.22
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
2
|
import CommonService from "../../utils/CommonService";
|
|
4
3
|
const ServiceBadges = ({ showTopLabel, isSoldOut, colors, renderIcon, translation, serviceItem, isAllinBus = false, boardingName, getAnimationIcon, }) => {
|
|
5
4
|
return (React.createElement("div", { className: "absolute -top-[10px] left-0 w-full flex items-center justify-end gap-[12px] pr-[22px] z-10" },
|
|
@@ -45,11 +44,12 @@ const ServiceBadges = ({ showTopLabel, isSoldOut, colors, renderIcon, translatio
|
|
|
45
44
|
backgroundColor: colors.topLabelBgColor || "#fff",
|
|
46
45
|
border: isSoldOut
|
|
47
46
|
? "1px solid #ccc"
|
|
48
|
-
: `1px solid ${colors.
|
|
49
|
-
color: isSoldOut ? "#ccc" : colors.
|
|
47
|
+
: `1px solid ${colors.boardingBorderColor}`,
|
|
48
|
+
color: isSoldOut ? "#ccc" : colors.boardingBorderColor,
|
|
50
49
|
} },
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
renderIcon("specialDeparture", "12px", {
|
|
51
|
+
filter: isSoldOut ? "grayscale(0.5)" : "",
|
|
52
|
+
}),
|
|
53
|
+
React.createElement("div", { className: isSoldOut ? "text-white" : `text-[${colors.boardingBorderColor}]` }, CommonService.capitalize(boardingName))))));
|
|
54
54
|
};
|
|
55
55
|
export default ServiceBadges;
|
package/package.json
CHANGED
|
@@ -183,6 +183,7 @@ export interface ServiceItemProps {
|
|
|
183
183
|
leftGradiantColor?: string;
|
|
184
184
|
discountSeatPriceColor?: string;
|
|
185
185
|
topLabelBgColor?: string;
|
|
186
|
+
boardingBorderColor?: string;
|
|
186
187
|
};
|
|
187
188
|
cityOrigin?: { value: number; label: string };
|
|
188
189
|
cityDestination?: { value: number; label: string };
|
|
@@ -104,20 +104,16 @@ const ServiceBadges: React.FC<ServiceBadgesProps> = ({
|
|
|
104
104
|
backgroundColor: colors.topLabelBgColor || "#fff",
|
|
105
105
|
border: isSoldOut
|
|
106
106
|
? "1px solid #ccc"
|
|
107
|
-
: `1px solid ${colors.
|
|
108
|
-
color: isSoldOut ? "#ccc" : colors.
|
|
107
|
+
: `1px solid ${colors.boardingBorderColor}`,
|
|
108
|
+
color: isSoldOut ? "#ccc" : colors.boardingBorderColor,
|
|
109
109
|
}}
|
|
110
110
|
>
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
width="14px"
|
|
115
|
-
height="14px"
|
|
116
|
-
/>
|
|
117
|
-
</div>
|
|
111
|
+
{renderIcon("specialDeparture", "12px", {
|
|
112
|
+
filter: isSoldOut ? "grayscale(0.5)" : "",
|
|
113
|
+
})}
|
|
118
114
|
<div
|
|
119
115
|
className={
|
|
120
|
-
isSoldOut ? "text-white" : `text-[${colors.
|
|
116
|
+
isSoldOut ? "text-white" : `text-[${colors.boardingBorderColor}]`
|
|
121
117
|
}
|
|
122
118
|
>
|
|
123
119
|
{CommonService.capitalize(boardingName)}
|