mirror of
https://github.com/jlengrand/adyen-web.git
synced 2026-03-10 08:01:22 +00:00
card_stop adding credit/debit class to non-cards (#2465)
* card_stop adding credit/debit class to non-cards * Adding changeset file
This commit is contained in:
7
.changeset/cool-hotels-remember.md
Normal file
7
.changeset/cool-hotels-remember.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@adyen/adyen-web': patch
|
||||
---
|
||||
|
||||
For all PaymentMethodItems we were adding a class `adyen-checkout__payment-method--{fundingSource}` (where fundingSource was either "credit" or "debit")
|
||||
|
||||
This is meant to be a Card PM specific class to indicate, in the paymentMethods list, whether the card is a credit or debit card.
|
||||
@@ -71,11 +71,13 @@ class PaymentMethodItem extends Component<PaymentMethodItemProps> {
|
||||
return null;
|
||||
}
|
||||
|
||||
const isCard = paymentMethod.props.type === 'card' || paymentMethod.props.type === 'scheme';
|
||||
|
||||
const paymentMethodClassnames = classNames({
|
||||
'adyen-checkout__payment-method': true,
|
||||
[styles['adyen-checkout__payment-method']]: true,
|
||||
[`adyen-checkout__payment-method--${paymentMethod.props.type}`]: true,
|
||||
[`adyen-checkout__payment-method--${paymentMethod.props.fundingSource ?? 'credit'}`]: true,
|
||||
...(isCard && { [`adyen-checkout__payment-method--${paymentMethod.props.fundingSource ?? 'credit'}`]: true }),
|
||||
'adyen-checkout__payment-method--selected': isSelected,
|
||||
[styles['adyen-checkout__payment-method--selected']]: isSelected,
|
||||
'adyen-checkout__payment-method--loading': isLoading,
|
||||
|
||||
Reference in New Issue
Block a user