defmodule PlausibleWeb.Components.Billing do @moduledoc false use PlausibleWeb, :component use Plausible require Plausible.Billing import PlausibleWeb.Components.Icons alias Plausible.Billing.{Plan, Plans, EnterprisePlan} attr :site, Plausible.Site, required: false, default: nil attr :current_user, Plausible.Auth.User, required: true attr :current_team, :any, required: true attr :locked?, :boolean, required: true attr :link_class, :string, default: "" slot :inner_block, required: true def feature_gate(assigns) do ~H"""
{PlausibleWeb.TextHelpers.format_date_range(@usage.date_range)} {cycle_label(@period)}
<.usage_progress_bar :if={@limit != :unlimited} id={"total_pageviews_#{@period}"} usage={@usage.total} limit={@limit} />