import React from 'react'; import classNames from 'classnames'; import { T } from 'components'; import { saveInvoke } from 'utils'; import 'style/pages/Subscription/PlanRadio.scss'; import 'style/pages/Subscription/PlanPeriodRadio.scss'; export function SubscriptionPlans({ value, plans, onSelect }) { const handleSelect = (value) => { onSelect && onSelect(value); }; return (
{plans.map((plan) => ( ))}
); } export function SubscriptionPlan({ name, description, price, currencyCode, value, selectedOption, onSelected, }) { const handlePlanClick = () => { saveInvoke(onSelected, value); }; return (
{name}
{price} {currencyCode}
); } /** * Subscription periods. */ export function SubscriptionPeriods({ periods, selectedPeriod, onPeriodSelect }) { const handleSelected = (value) => { saveInvoke(onPeriodSelect, value); }; return (
{periods.map((period) => ( ))}
); } /** * Billing period. */ export function SubscriptionPeriod({ // #ownProps label, selectedPeriod, onSelected, period, price, currencyCode, }) { const handlePeriodClick = () => { saveInvoke(onSelected, period); }; return (
{label}
{price} {currencyCode} {label}
); }