PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.0.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.0.0
2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
subscription / src / dashboard / HealthBanner.js

HealthBanner.js in Subscriptions for WooCommerce with Stripe Recurring Payments 2.0.0, at src/dashboard/HealthBanner.js

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * One sentence answering "is anything wrong".
3 *
4 * Full width and directly under the figures, because it is the thing a store
5 * owner opens this page to find out.
6 */
7
8 // TODO(refactor): replace @wordpress/components with our `wpsubs-*` admin
9 // components (wpsubs-btn, …) — see src/dashboard/index.js.
10 import { Button } from "@wordpress/components";
11 import Icon from "./Icon";
12
13 export default function HealthBanner({ health }) {
14 const clear = health.state === "clear";
15
16 return (
17 <div className={`subscrpt-banner is-${health.state}`}>
18 <span className="subscrpt-banner__badge">
19 <Icon name={clear ? "shield" : "alert"} size={20} />
20 </span>
21
22 <div className="subscrpt-banner__body">
23 <p className="subscrpt-banner__title">{health.title}</p>
24 <p className="subscrpt-banner__text">{health.text}</p>
25 </div>
26
27 {health.action && (
28 <Button variant="primary" href={health.action.url}>
29 {health.action.label}
30 </Button>
31 )}
32 </div>
33 );
34 }
35