Design Token Type Definitions (tokens/types.ts)

pocketpal-ai · src/theme/tokens/types.ts · typescript · MIT
ui, dev-tools, lang:typescript, fw:react-native

TypeScript interfaces defining color, typography, and spacing design tokens for PocketPal's theme system. Reuse when building or extending a typed design-token layer.

// Source: https://github.com/a-ghorbani/pocketpal-ai | License: MIT | Copyright 2024 Asghar Ghorbani
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Design-token types for PocketPal's new design system (Phase 1).
 *
 * Pure data types. No React, no Paper, no MobX imports.
 */
import {TextStyle} from 'react-native';

export type Mode = 'light' | 'dark';

/**
 * Color tokens — every key has a light and dark binding (encoded in the
 * `lightColors` / `darkColors` exports). Names mirror MD3 conventions for
 * the migration layer; semantic / PocketPal-specific extras are appended.
 */
export interface TokenColors {
  // MD3 base palette
  primary: string;
  onPrimary: string;
  primaryContainer: string;
  onPrimaryContainer: string;
  secondary: string;
  onSecondary: s

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

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

Get a free API key