ui

package
v0.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ui provides Pine UI components for the subscription plugin dashboard

Package ui provides Pine UI page templates for the subscription plugin dashboard

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alert

func Alert(message, variant string) g.Node

Alert renders an alert component.

func Badge

func Badge(text, variant string) g.Node

Badge renders a Pine UI badge.

func BillingOverviewPage

func BillingOverviewPage(basePath string, metrics *core.DashboardMetrics, recentSubs []*core.Subscription) g.Node

BillingOverviewPage renders the billing overview dashboard.

func Button

func Button(text string, variant string, attrs ...g.Node) g.Node

Button renders a Pine UI button.

func Card

func Card(title string, children ...g.Node) g.Node

Card renders a Pine UI card component.

func CardWithActions

func CardWithActions(title string, actions g.Node, children ...g.Node) g.Node

CardWithActions renders a card with header actions.

func CouponsListPage

func CouponsListPage(basePath string, coupons []*core.Coupon, total, page, pageSize int) g.Node

CouponsListPage renders the coupons list page.

func DescriptionList

func DescriptionList(items map[string]g.Node) g.Node

DescriptionList renders a description list.

func EmptyState

func EmptyState(title, description string, action g.Node) g.Node

EmptyState renders an empty state component.

func FormField

func FormField(label, name, fieldType, value, placeholder string, required bool) g.Node

FormField renders a form field with label.

func InvoicesListPage

func InvoicesListPage(basePath string, invoices []*core.Invoice, total, page, pageSize int) g.Node

InvoicesListPage renders the invoices list page.

func LinkButton

func LinkButton(text, href, variant string) g.Node

LinkButton renders a button as a link.

func Modal(id, title string, content, footer g.Node) g.Node

Modal renders a modal wrapper (requires JS to show/hide).

func MoneyDisplay

func MoneyDisplay(amount int64, currency string) g.Node

MoneyDisplay formats and displays a money amount.

func PageLayout

func PageLayout(title string, breadcrumbs []Breadcrumb, actions g.Node, content ...g.Node) g.Node

PageLayout wraps content in a standard page layout.

func Pagination

func Pagination(currentPage, totalPages int, baseURL string) g.Node

Pagination renders pagination controls.

func PlansListPage

func PlansListPage(basePath string, plans []*core.Plan, total, page, pageSize int) g.Node

PlansListPage renders the plans list page.

func SelectField

func SelectField(label, name string, options []SelectOption, selectedValue string, required bool) g.Node

SelectField renders a select field.

func StatCard

func StatCard(title, value, change string, positive bool, icon g.Node) g.Node

StatCard renders a statistics card.

func StatusBadge

func StatusBadge(status string) g.Node

StatusBadge renders a status badge based on subscription status.

func SubscriptionsListPage

func SubscriptionsListPage(basePath string, subs []*core.Subscription, total, page, pageSize int) g.Node

SubscriptionsListPage renders the subscriptions list page.

func Table

func Table(headers []string, rows ...g.Node) g.Node

Table renders a Pine UI table.

func TableCell

func TableCell(content g.Node) g.Node

TableCell renders a table cell.

func TableCellMuted

func TableCellMuted(content g.Node) g.Node

TableCellMuted renders a muted table cell.

func TableRow

func TableRow(cells ...g.Node) g.Node

TableRow renders a table row.

func UsageDashboardPage

func UsageDashboardPage(basePath string, usage map[string]*core.UsageLimit) g.Node

UsageDashboardPage renders the usage dashboard.

Types

type Breadcrumb struct {
	Label string
	Href  string
}

Breadcrumb represents a breadcrumb item.

type SelectOption

type SelectOption struct {
	Value string
	Label string
}

SelectOption represents an option in a select field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL