Pass child props to partners card (https://github.com/woocommerce/woocommerce-admin/pull/7929)
This commit is contained in:
parent
30e9922986
commit
331ca075c4
|
@ -12,13 +12,12 @@ import { recordEvent } from '@woocommerce/tracks';
|
|||
import { PartnerCard } from '../components/partner-card';
|
||||
import logo from './logo.png';
|
||||
|
||||
export const Card = ( { isPending, task } ) => {
|
||||
export const Card = ( { task } ) => {
|
||||
const { avalaraActivated } = task.additionalData;
|
||||
|
||||
return (
|
||||
<PartnerCard
|
||||
name={ __( 'Avalara', 'woocommerce-admin' ) }
|
||||
isPending={ isPending }
|
||||
logo={ logo }
|
||||
description={ __(
|
||||
'Powerful all-in-one tax tool',
|
||||
|
|
|
@ -18,7 +18,7 @@ export const PartnerCard: React.FC< {
|
|||
terms: string;
|
||||
actionText: string;
|
||||
onClick: () => void;
|
||||
isPending: boolean;
|
||||
isBusy?: boolean;
|
||||
} > = ( {
|
||||
name,
|
||||
logo,
|
||||
|
@ -27,7 +27,7 @@ export const PartnerCard: React.FC< {
|
|||
terms,
|
||||
actionText,
|
||||
onClick,
|
||||
isPending,
|
||||
isBusy,
|
||||
} ) => {
|
||||
return (
|
||||
<div className="woocommerce-tax-partner-card">
|
||||
|
@ -63,8 +63,8 @@ export const PartnerCard: React.FC< {
|
|||
<Button
|
||||
isSecondary
|
||||
onClick={ onClick }
|
||||
isBusy={ isPending }
|
||||
disabled={ isPending }
|
||||
isBusy={ isBusy }
|
||||
disabled={ isBusy }
|
||||
>
|
||||
{ actionText }
|
||||
</Button>
|
||||
|
|
|
@ -238,7 +238,7 @@ const Tax = ( { onComplete, query, task } ) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<Partners>
|
||||
<Partners { ...childProps }>
|
||||
{ partners.map( ( partner ) =>
|
||||
createElement( partner.card, {
|
||||
key: partner.id,
|
||||
|
|
|
@ -14,11 +14,10 @@ import { PartnerCard } from '../components/partner-card';
|
|||
import logo from './logo.png';
|
||||
import { TaxChildProps } from '../utils';
|
||||
|
||||
export const Card: React.FC< TaxChildProps > = ( { isPending } ) => {
|
||||
export const Card: React.FC< TaxChildProps > = () => {
|
||||
return (
|
||||
<PartnerCard
|
||||
name={ __( 'WooCommerce Tax', 'woocommerce-admin' ) }
|
||||
isPending={ isPending }
|
||||
logo={ logo }
|
||||
description={ __( 'Best for new stores', 'woocommerce-admin' ) }
|
||||
benefits={ [
|
||||
|
|
Loading…
Reference in New Issue