2021-11-05 20:32:02 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { Button } from '@wordpress/components';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { Bullet } from './bullet';
|
|
|
|
import './partner-card.scss';
|
|
|
|
|
|
|
|
export const PartnerCard: React.FC< {
|
|
|
|
name: string;
|
|
|
|
logo: string;
|
|
|
|
description: string;
|
2022-04-21 04:44:19 +00:00
|
|
|
benefits: ( string | JSX.Element )[];
|
|
|
|
terms: string | JSX.Element;
|
2021-11-05 20:32:02 +00:00
|
|
|
actionText: string;
|
|
|
|
onClick: () => void;
|
2021-11-15 20:09:02 +00:00
|
|
|
isBusy?: boolean;
|
2021-11-05 20:32:02 +00:00
|
|
|
} > = ( {
|
|
|
|
name,
|
|
|
|
logo,
|
|
|
|
description,
|
|
|
|
benefits,
|
|
|
|
terms,
|
|
|
|
actionText,
|
|
|
|
onClick,
|
2021-11-15 20:09:02 +00:00
|
|
|
isBusy,
|
2021-11-05 20:32:02 +00:00
|
|
|
} ) => {
|
|
|
|
return (
|
|
|
|
<div className="woocommerce-tax-partner-card">
|
|
|
|
<div className="woocommerce-tax-partner-card__logo">
|
|
|
|
<img src={ logo } alt={ name } />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="woocommerce-tax-partner-card__description">
|
|
|
|
{ description }
|
|
|
|
</div>
|
|
|
|
<ul className="woocommerce-tax-partner-card__benefits">
|
|
|
|
{ benefits.map( ( benefit, i ) => {
|
|
|
|
return (
|
|
|
|
<li
|
|
|
|
className="woocommerce-tax-partner-card__benefit"
|
|
|
|
key={ i }
|
|
|
|
>
|
|
|
|
<span className="woocommerce-tax-partner-card__benefit-bullet">
|
|
|
|
<Bullet />
|
|
|
|
</span>
|
|
|
|
<span className="woocommerce-tax-partner-card__benefit-text">
|
|
|
|
{ benefit }
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
);
|
|
|
|
} ) }
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div className="woocommerce-tax-partner-card__action">
|
|
|
|
<div className="woocommerce-tax-partner-card__terms">
|
|
|
|
{ terms }
|
|
|
|
</div>
|
|
|
|
<Button
|
|
|
|
isSecondary
|
|
|
|
onClick={ onClick }
|
2021-11-15 20:09:02 +00:00
|
|
|
isBusy={ isBusy }
|
|
|
|
disabled={ isBusy }
|
2021-11-05 20:32:02 +00:00
|
|
|
>
|
|
|
|
{ actionText }
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|