PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
give / src / Promotions / InPluginUpsells / resources / js / components / PricingPlans.js

PricingPlans.js in GiveWP – Donation Plugin and Fundraising Platform 4.17.0, at src/Promotions/InPluginUpsells/resources/js/components/PricingPlans.js

36 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import {PricingPlanCard} from './PricingPlanCard';
2 import {Hero} from './Hero';
3 import styles from './PricingPlans.module.css';
4
5 const {heading, description, plansButtonCaption, plans} = window.GiveAddons.pricingPlans;
6
7 const customPlanOrder = ['Plus Plan', 'Pro Plan', 'Basic Plan', 'Agency Plan'];
8
9 const sortedPlans = plans.slice().sort((a, b) => {
10 const aIndex = customPlanOrder.indexOf(a.name);
11 const bIndex = customPlanOrder.indexOf(b.name);
12 return aIndex - bIndex;
13 });
14
15 export const PricingPlans = () => (
16 <article>
17 <Hero heading={heading} description={description} />
18 <ul className={styles.plans}>
19 {sortedPlans.map((plan) => (
20 <li key={plan.name}>
21 <PricingPlanCard
22 name={plan.name}
23 description={plan.description}
24 actionText={plansButtonCaption}
25 actionLink={plan.url}
26 icon={plan.icon}
27 savingsPercentage={plan.savingsPercentage}
28 includes={plan.includes}
29 isMostPopular={plan.mostPopular}
30 />
31 </li>
32 ))}
33 </ul>
34 </article>
35 );
36