kupos-ui-components-lib 10.2.9 → 10.2.10
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/dist/components/Survey/SurveyDesktop.js +1 -1
- package/dist/components/Survey/SurveyMobile.js +1 -1
- package/dist/components/Survey/types.d.ts +1 -0
- package/dist/ui/KuposButton/KuposButton.d.ts +2 -1
- package/dist/ui/KuposButton/KuposButton.js +2 -2
- package/package.json +1 -1
- package/src/components/Survey/SurveyDesktop.tsx +1 -0
- package/src/components/Survey/SurveyMobile.tsx +1 -0
- package/src/components/Survey/types.ts +1 -0
- package/src/ui/KuposButton/KuposButton.tsx +6 -1
|
@@ -26,6 +26,6 @@ const SurveyDesktop = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feed
|
|
|
26
26
|
React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange, colors: colors }),
|
|
27
27
|
React.createElement("div", { className: "flex justify-center mt-[20px]" },
|
|
28
28
|
React.createElement("div", { className: "w-[180px]" },
|
|
29
|
-
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit }))))));
|
|
29
|
+
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit, buttonTextColor: colors.buttonColor || "#fff" }))))));
|
|
30
30
|
};
|
|
31
31
|
export default SurveyDesktop;
|
|
@@ -26,6 +26,6 @@ const SurveyMobile = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedb
|
|
|
26
26
|
React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange }),
|
|
27
27
|
React.createElement("div", { className: "flex justify-center mt-[50px] mb-[50px]" },
|
|
28
28
|
React.createElement("div", { className: "w-[100px]" },
|
|
29
|
-
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit }))))));
|
|
29
|
+
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit, buttonTextColor: (colors === null || colors === void 0 ? void 0 : colors.buttonColor) || "#fff" }))))));
|
|
30
30
|
};
|
|
31
31
|
export default SurveyMobile;
|
|
@@ -7,6 +7,7 @@ interface KuposButtonProps {
|
|
|
7
7
|
soldOutLabel?: string;
|
|
8
8
|
soldOutIcon?: React.ReactNode;
|
|
9
9
|
onClick: () => void;
|
|
10
|
+
buttonTextColor?: any;
|
|
10
11
|
}
|
|
11
|
-
declare function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, }: KuposButtonProps): React.ReactElement;
|
|
12
|
+
declare function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, buttonTextColor, }: KuposButtonProps): React.ReactElement;
|
|
12
13
|
export default KuposButton;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, }) {
|
|
2
|
+
function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, buttonTextColor, }) {
|
|
3
3
|
const isDisabled = isLoading || isSoldOut;
|
|
4
4
|
return (React.createElement("button", { onClick: () => (!isSoldOut ? onClick() : null), disabled: isLoading, className: "w-full text-[12px] font-bold text-white rounded-[14px] border-none px-[20px] flex items-center justify-center", style: {
|
|
5
5
|
backgroundColor: isDisabled ? "lightgray" : buttonColor,
|
|
6
6
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
7
7
|
padding: isLoading ? "7px 0" : isSoldOut ? "12px 0" : "12px 0",
|
|
8
8
|
} },
|
|
9
|
-
React.createElement("span", { className: "min-w-[75px] flex justify-center items-center bold-text uppercase gap-[5px]" },
|
|
9
|
+
React.createElement("span", { className: "min-w-[75px] flex justify-center items-center bold-text uppercase gap-[5px]", style: { color: buttonTextColor } },
|
|
10
10
|
isSoldOut ? soldOutIcon : null,
|
|
11
11
|
isLoading ? (React.createElement("span", { className: "loader-circle" })) : !isSoldOut ? (React.createElement("span", { className: "normal-case" }, buyLabel.charAt(0).toUpperCase() + buyLabel.slice(1).toLowerCase())) : (React.createElement("span", { className: "normal-case" }, soldOutLabel.charAt(0).toUpperCase() +
|
|
12
12
|
soldOutLabel.slice(1).toLowerCase())))));
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ interface KuposButtonProps {
|
|
|
8
8
|
soldOutLabel?: string;
|
|
9
9
|
soldOutIcon?: React.ReactNode;
|
|
10
10
|
onClick: () => void;
|
|
11
|
+
buttonTextColor?: any;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
function KuposButton({
|
|
@@ -18,6 +19,7 @@ function KuposButton({
|
|
|
18
19
|
soldOutLabel,
|
|
19
20
|
soldOutIcon,
|
|
20
21
|
onClick,
|
|
22
|
+
buttonTextColor,
|
|
21
23
|
}: KuposButtonProps): React.ReactElement {
|
|
22
24
|
const isDisabled = isLoading || isSoldOut;
|
|
23
25
|
|
|
@@ -32,7 +34,10 @@ function KuposButton({
|
|
|
32
34
|
padding: isLoading ? "7px 0" : isSoldOut ? "12px 0" : "12px 0",
|
|
33
35
|
}}
|
|
34
36
|
>
|
|
35
|
-
<span
|
|
37
|
+
<span
|
|
38
|
+
className="min-w-[75px] flex justify-center items-center bold-text uppercase gap-[5px]"
|
|
39
|
+
style={{ color: buttonTextColor }}
|
|
40
|
+
>
|
|
36
41
|
{isSoldOut ? soldOutIcon : null}
|
|
37
42
|
{isLoading ? (
|
|
38
43
|
<span className="loader-circle"></span>
|