I have in my html code
<img class="payment-icon" alt="Logo" data-bind="attr: {src: getLogo(), alt: $t('Logo')}" style="max-height: 1.7em"/>
and in my js code i have
GetLogo: function () { return window.checkoutConfig.payment[this.getCode()].logo; },
But now i want to change my style depending on custom switch.
Is there any way I can control css from my js code?
Hi @bartoszcoye941 ,
Selected payment method class uses "payment-method _active" class
Rest of the payment methods class uses "payment-method" class
Based on that you can create css in theme and apply it based on your requirement
Problem Solved? Accept as Solution!
Hope it helps!
Thanks
@Ankit Jasani wrote:Hi @HISD Connect
Selected payment method class uses "payment-method _active" class
Rest of the payment methods class uses "payment-method" class
Based on that you can create css in theme and apply it based on your requirement
Problem Solved? Accept as Solution!
Hope it helps!
Thanks
Thank you for the suggestion, I was looking for the same.
you can also change the payment icons by using CSS. Method 1: Editing Code in Your Theme’s Settings. Method 2: Using a Shopify Plugin or App. You can use this both methods to set custom css for payment method icon. Caregiver Connect Aurora