Merge pull request #32773 from woocommerce/dev/32575-add-generic-fallback-image-payments-task

Add fallback image payments task gateway icons
This commit is contained in:
Ilyas Foo 2022-04-28 13:31:13 +08:00 committed by GitHub
commit 1e6d45dd9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import { __ } from '@wordpress/i18n';
*/ */
import { Action } from '../Action'; import { Action } from '../Action';
import './List.scss'; import './List.scss';
import fallbackImage from './fallback.png';
export const Item = ( { isRecommended, markConfigured, paymentGateway } ) => { export const Item = ( { isRecommended, markConfigured, paymentGateway } ) => {
const { const {
@ -60,7 +61,13 @@ export const Item = ( { isRecommended, markConfigured, paymentGateway } ) => {
className={ classes } className={ classes }
> >
<CardMedia isBorderless> <CardMedia isBorderless>
<img src={ image72x72 } alt={ title } /> <img
src={ image72x72 }
alt={ title }
onError={ ( e ) =>
( e.currentTarget.src = fallbackImage )
}
/>
</CardMedia> </CardMedia>
<div className="woocommerce-task-payment__description"> <div className="woocommerce-task-payment__description">
<Text as="h3" className="woocommerce-task-payment__title"> <Text as="h3" className="woocommerce-task-payment__title">

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

View File

@ -0,0 +1,4 @@
Significance: patch
Type: enhancement
Add fallback image for payments task gateway icons