/** * Onboarding checklist. * * The wizard's three steps, each with a button to where it gets done, then a * warning when no payment gateway is on — onboarding can be finished without * one, but no customer can pay. Once the steps are done the card shrinks to a * single line that still opens the wizard, so it can be run again for another * plan; the gateway warning stays until a gateway is on. */ import { __, sprintf } from "@wordpress/i18n"; // TODO(refactor): replace @wordpress/components with our `wpsubs-*` admin // components (wpsubs-table-card, wpsubs-btn, …) — see src/dashboard/index.js. import { Card, CardHeader, CardBody, Button } from "@wordpress/components"; import Icon from "./Icon"; function Count({ setup }) { return ( {sprintf( /* translators: 1: steps done, 2: steps total. */ __("%1$d of %2$d done", "subscription"), setup.done, setup.total, )} ); } function WizardLink({ wizard }) { return ( {wizard.label} ); } function GatewayWarning({ gateway }) { return (
{gateway.title}
{gateway.text}
{__("Your first plan, step by step.", "subscription")}