master @ 13 LINES
[ HISTORY ] [ UP ]
┌─ TS ───────────────────────────────────────────────────────────────────────┐
│ export type StatusVariant = "ok" | "error" | "pending"; │
│ │
│ export interface Props { │
│ message: string; │
│ variant?: StatusVariant; │
│ } │
│ │
│ export const STATUS_TAG: Record<StatusVariant, string> = { │
│ ok: "[ OK ]", │
│ error: "[ !! ]", │
│ pending: "[ .. ]", │
│ }; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ TS ─────────────────────────────────┐
│ export type StatusVariant = "ok" | "error" | │
│ "pending"; │
│ │
│ export interface Props { │
│ message: string; │
│ variant?: StatusVariant; │
│ } │
│ │
│ export const STATUS_TAG: Record<StatusVarian │
│ t, string> = { │
│ ok: "[ OK ]", │
│ error: "[ !! ]", │
│ pending: "[ .. ]", │
│ }; │
└──────────────────────────────────────────────┘
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET