@thecb/components 11.6.6 → 11.6.7
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
|
Binary file
|
|
@@ -31,15 +31,20 @@ const PaymentButtonBar = ({
|
|
|
31
31
|
}) => {
|
|
32
32
|
const { isMobile } = useContext(ThemeContext);
|
|
33
33
|
|
|
34
|
+
// cancel URLs are external (back to client system)
|
|
35
|
+
const handleCancel = () => {
|
|
36
|
+
window.location.href = cancelURL;
|
|
37
|
+
};
|
|
38
|
+
|
|
34
39
|
const backButton =
|
|
35
40
|
!!cancelURL && !!cancelText ? (
|
|
36
|
-
<
|
|
41
|
+
<ButtonWithAction
|
|
37
42
|
text={cancelText}
|
|
38
|
-
|
|
43
|
+
action={handleCancel}
|
|
39
44
|
variant={backButtonVariant}
|
|
40
45
|
extraStyles={isMobile && "flex-grow: 1"}
|
|
41
46
|
dataQa={backButtonTestId || cancelText}
|
|
42
|
-
aria-
|
|
47
|
+
aria-label={`${cancelText}, navigate back to previous site`}
|
|
43
48
|
role="link"
|
|
44
49
|
/>
|
|
45
50
|
) : (
|
|
@@ -50,7 +55,7 @@ const PaymentButtonBar = ({
|
|
|
50
55
|
action={backButtonAction}
|
|
51
56
|
extraStyles={isMobile && "flex-grow: 1"}
|
|
52
57
|
dataQa="Back"
|
|
53
|
-
aria-
|
|
58
|
+
aria-label={"Back, navigate to previous page"}
|
|
54
59
|
role="link"
|
|
55
60
|
/>
|
|
56
61
|
)
|