# subscription/2.0.0/src/dashboard/HealthBanner.js

Subscriptions for WooCommerce with Stripe Recurring Payments, version 2.0.0. 35 lines.

- Page: https://pluginprobe.com/plugins/subscription/2.0.0/code/src/dashboard/HealthBanner.js
- Raw: https://pluginprobe.com/plugins/subscription/2.0.0/raw/src/dashboard/HealthBanner.js
- Modified: 2026-09-14T12:17:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/subscription/2.0.0/code/src/dashboard/HealthBanner.js#L10-L20`.

```javascript
/**
 * One sentence answering "is anything wrong".
 *
 * Full width and directly under the figures, because it is the thing a store
 * owner opens this page to find out.
 */

// TODO(refactor): replace @wordpress/components with our `wpsubs-*` admin
// components (wpsubs-btn, …) — see src/dashboard/index.js.
import { Button } from "@wordpress/components";
import Icon from "./Icon";

export default function HealthBanner({ health }) {
  const clear = health.state === "clear";

  return (
    <div className={`subscrpt-banner is-${health.state}`}>
      <span className="subscrpt-banner__badge">
        <Icon name={clear ? "shield" : "alert"} size={20} />
      </span>

      <div className="subscrpt-banner__body">
        <p className="subscrpt-banner__title">{health.title}</p>
        <p className="subscrpt-banner__text">{health.text}</p>
      </div>

      {health.action && (
        <Button variant="primary" href={health.action.url}>
          {health.action.label}
        </Button>
      )}
    </div>
  );
}

```
