| 1 |
import {__} from '@wordpress/i18n'; |
| 2 |
|
| 3 |
import {AdditionalAddonCard} from './AdditionalAddonCard'; |
| 4 |
import {Button} from './Button'; |
| 5 |
import {Hero} from './Hero'; |
| 6 |
import styles from './AdditionalAddons.module.css'; |
| 7 |
|
| 8 |
const {heading, description, addons, addonButtonCaption, allAddonsUrl} = window.GiveAddons.additionalAddons; |
| 9 |
|
| 10 |
export const AdditionalAddons = () => ( |
| 11 |
<article> |
| 12 |
<Hero heading={heading} description={description} /> |
| 13 |
<ul className={styles.addons}> |
| 14 |
{addons.map(({name, image, description, url}) => ( |
| 15 |
<li key={name}> |
| 16 |
<AdditionalAddonCard |
| 17 |
name={name} |
| 18 |
description={description} |
| 19 |
image={image} |
| 20 |
actionText={addonButtonCaption} |
| 21 |
actionLink={url} |
| 22 |
/> |
| 23 |
</li> |
| 24 |
))} |
| 25 |
</ul> |
| 26 |
<div className={styles.viewAll}> |
| 27 |
<p |
| 28 |
className={styles.viewAllText} |
| 29 |
dangerouslySetInnerHTML={{ |
| 30 |
__html: __('Didn’t find what you were looking for?<br> View the entire catalog!', 'give'), |
| 31 |
}} |
| 32 |
/> |
| 33 |
<Button as="a" href={allAddonsUrl} rel="noopener" target="_blank" className={styles.viewAllButton}> |
| 34 |
{__('View All Add-ons', 'give')} |
| 35 |
</Button> |
| 36 |
</div> |
| 37 |
</article> |
| 38 |
); |
| 39 |
|