All files / src/features/milestones/components category-meta.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48                              5x                                                                
import type { MilestoneCategory } from '../api/milestones.schemas'
 
interface CategoryMeta {
  emoji: string
  nodeClass: string
  badgeClass: string
  solidClass: string
}
 
/**
 * Display-only mapping — the API has no icon/color field, only `category`.
 * Colors follow the committed design reference's category table (not a 1:1 hue-per-category with
 * other features — e.g. MOTOR is the brand green here and vaccine "applied" is
 * the same green; that's intentional, matching the design reference exactly).
 */
export const MILESTONE_CATEGORY_META: Record<MilestoneCategory, CategoryMeta> = {
  MOTOR: {
    emoji: '🏃',
    nodeClass: 'bg-emerald-50 dark:bg-emerald-950/40 border-emerald-600',
    badgeClass: 'bg-emerald-50 dark:bg-emerald-950/40 text-emerald-700 dark:text-emerald-300',
    solidClass: 'bg-emerald-700 text-white',
  },
  LANGUAGE: {
    emoji: '🗣️',
    nodeClass: 'bg-violet-50 dark:bg-violet-950/40 border-violet-500',
    badgeClass: 'bg-violet-50 dark:bg-violet-950/40 text-violet-700 dark:text-violet-300',
    solidClass: 'bg-violet-700 text-white',
  },
  SOCIAL: {
    emoji: '😊',
    nodeClass: 'bg-amber-50 dark:bg-amber-950/40 border-amber-500',
    badgeClass: 'bg-amber-50 dark:bg-amber-950/40 text-amber-700 dark:text-amber-300',
    solidClass: 'bg-amber-700 text-white',
  },
  COGNITIVE: {
    emoji: '🧠',
    nodeClass: 'bg-rose-50 dark:bg-rose-950/40 border-rose-500',
    badgeClass: 'bg-rose-50 dark:bg-rose-950/40 text-rose-700 dark:text-rose-300',
    solidClass: 'bg-rose-700 text-white',
  },
  OTHER: {
    emoji: '🌟',
    nodeClass: 'bg-slate-100 border-slate-400',
    badgeClass: 'bg-slate-100 text-slate-700',
    solidClass: 'bg-slate-600 text-white',
  },
}