Remove setbuttonElementStyles google pay

This commit is contained in:
tudinhtu98 2023-02-06 02:38:23 +07:00
parent 6b534cc3b2
commit f11354c60c
1 changed files with 1 additions and 18 deletions

View File

@ -13,7 +13,7 @@ export default Component.extend({
console.log("GooglePay is unvailable")
}
});
this.setbuttonElementStyles();
this.paymentRequest.on("paymentMethod", async (e) => {
// create a payment intent on the server
// confirm the payment on the client
@ -21,22 +21,5 @@ export default Component.extend({
});
},
setbuttonElementStyles() {
const root = document.querySelector(":root");
const computedStyle = getComputedStyle(root);
const primaryColor = computedStyle.getPropertyValue("--primary");
const placeholderColor =
computedStyle.getPropertyValue("--secondary-medium");
this.buttonElement.update({
style: {
base: {
color: primaryColor,
"::placeholder": {
color: placeholderColor,
},
},
},
});
},
didDestroyElement() {},
});