This commit is contained in:
Joshua T Flowers 2021-11-15 15:09:02 -05:00 committed by GitHub
parent 30e9922986
commit 331ca075c4
4 changed files with 7 additions and 9 deletions

View File

@ -12,13 +12,12 @@ import { recordEvent } from '@woocommerce/tracks';
import { PartnerCard } from '../components/partner-card'; import { PartnerCard } from '../components/partner-card';
import logo from './logo.png'; import logo from './logo.png';
export const Card = ( { isPending, task } ) => { export const Card = ( { task } ) => {
const { avalaraActivated } = task.additionalData; const { avalaraActivated } = task.additionalData;
return ( return (
<PartnerCard <PartnerCard
name={ __( 'Avalara', 'woocommerce-admin' ) } name={ __( 'Avalara', 'woocommerce-admin' ) }
isPending={ isPending }
logo={ logo } logo={ logo }
description={ __( description={ __(
'Powerful all-in-one tax tool', 'Powerful all-in-one tax tool',

View File

@ -18,7 +18,7 @@ export const PartnerCard: React.FC< {
terms: string; terms: string;
actionText: string; actionText: string;
onClick: () => void; onClick: () => void;
isPending: boolean; isBusy?: boolean;
} > = ( { } > = ( {
name, name,
logo, logo,
@ -27,7 +27,7 @@ export const PartnerCard: React.FC< {
terms, terms,
actionText, actionText,
onClick, onClick,
isPending, isBusy,
} ) => { } ) => {
return ( return (
<div className="woocommerce-tax-partner-card"> <div className="woocommerce-tax-partner-card">
@ -63,8 +63,8 @@ export const PartnerCard: React.FC< {
<Button <Button
isSecondary isSecondary
onClick={ onClick } onClick={ onClick }
isBusy={ isPending } isBusy={ isBusy }
disabled={ isPending } disabled={ isBusy }
> >
{ actionText } { actionText }
</Button> </Button>

View File

@ -238,7 +238,7 @@ const Tax = ( { onComplete, query, task } ) => {
} }
return ( return (
<Partners> <Partners { ...childProps }>
{ partners.map( ( partner ) => { partners.map( ( partner ) =>
createElement( partner.card, { createElement( partner.card, {
key: partner.id, key: partner.id,

View File

@ -14,11 +14,10 @@ import { PartnerCard } from '../components/partner-card';
import logo from './logo.png'; import logo from './logo.png';
import { TaxChildProps } from '../utils'; import { TaxChildProps } from '../utils';
export const Card: React.FC< TaxChildProps > = ( { isPending } ) => { export const Card: React.FC< TaxChildProps > = () => {
return ( return (
<PartnerCard <PartnerCard
name={ __( 'WooCommerce Tax', 'woocommerce-admin' ) } name={ __( 'WooCommerce Tax', 'woocommerce-admin' ) }
isPending={ isPending }
logo={ logo } logo={ logo }
description={ __( 'Best for new stores', 'woocommerce-admin' ) } description={ __( 'Best for new stores', 'woocommerce-admin' ) }
benefits={ [ benefits={ [