import React from 'react'; import { FastField, Field } from 'formik'; import BillingPlan from './BillingPlan'; import withPlans from './withPlans'; import { compose } from 'utils'; /** * Billing plans. */ function BillingPlans({ plans, title, description, selectedOption }) { return (

{title}

{description}

{({ form: { setFieldValue }, field: { value } }) => (
{plans.map((plan) => ( setFieldValue('plan_slug', value)} selectedOption={value} /> ))}
)}
); } export default compose(withPlans(({ plans }) => ({ plans })))(BillingPlans);