@paypal/checkout-components 5.0.376 → 5.0.377
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
package/src/ui/buttons/props.js
CHANGED
|
@@ -868,3 +868,31 @@ describe("getButtonColor", () => {
|
|
|
868
868
|
});
|
|
869
869
|
});
|
|
870
870
|
});
|
|
871
|
+
|
|
872
|
+
describe("HideSubmitButtonProps type validation", () => {
|
|
873
|
+
it("should allow hideSubmitButtonForCardForm as an optional boolean property", () => {
|
|
874
|
+
// This test ensures the Flow type definition accepts the new property
|
|
875
|
+
const validButtonProps = {
|
|
876
|
+
hideSubmitButtonForCardForm: true,
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
// This would fail Flow type checking if the property isn't properly defined
|
|
880
|
+
expect(typeof validButtonProps.hideSubmitButtonForCardForm).toBe("boolean");
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
it("should allow hideSubmitButtonForCardForm to be undefined", () => {
|
|
884
|
+
const validButtonProps = {
|
|
885
|
+
// hideSubmitButtonForCardForm is optional
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
expect(validButtonProps.hideSubmitButtonForCardForm).toBeUndefined();
|
|
889
|
+
});
|
|
890
|
+
|
|
891
|
+
it("should allow hideSubmitButtonForCardForm to be false", () => {
|
|
892
|
+
const validButtonProps = {
|
|
893
|
+
hideSubmitButtonForCardForm: false,
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
expect(validButtonProps.hideSubmitButtonForCardForm).toBe(false);
|
|
897
|
+
});
|
|
898
|
+
});
|
|
@@ -1298,6 +1298,18 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
1298
1298
|
required: false,
|
|
1299
1299
|
default: () => window.__TEST_WALLET__,
|
|
1300
1300
|
},
|
|
1301
|
+
|
|
1302
|
+
hideSubmitButtonForCardForm: {
|
|
1303
|
+
type: "boolean",
|
|
1304
|
+
required: false,
|
|
1305
|
+
queryParam: true,
|
|
1306
|
+
},
|
|
1307
|
+
},
|
|
1308
|
+
|
|
1309
|
+
exports: {
|
|
1310
|
+
submitCardForm: {
|
|
1311
|
+
type: "function",
|
|
1312
|
+
},
|
|
1301
1313
|
},
|
|
1302
1314
|
});
|
|
1303
1315
|
});
|