getStatusVariant (utils/status-badge.ts)

appwrite · apps/console/src/lib/utils/status-badge.ts · typescript · BSD-3-Clause
payments

Standardizes status badge variants and colors for UI components.

// Source: https://github.com/appwrite/appwrite | License: BSD-3-Clause | Copyright 2019 Appwrite (https://appwrite.io) and individual contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Status Badge Utilities
 *
 * Provides standardized colors and variants for status badges across the application.
 * All status badges should use these utilities for consistency.
 */

import type { CanonicalPlanId } from '@/lib/utils/plan-filter'

/**
 * Status types for general use cases
 */
export type StatusType =
  | 'success'
  | 'warning'
  | 'error'
  | 'info'
  | 'pending'
  | 'processing'
  | 'active'
  | 'inactive'
  | 'completed'
  | 'failed'
  | 'verified'
  | 'unverified'

/**
 * Get status badge variant for Badge component
 * Maps status types to Badge componen

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key