mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
20 lines
698 B
TypeScript
20 lines
698 B
TypeScript
import type {EventAction} from '../api'
|
|
|
|
export const actionToColor = (a: EventAction) => a === 'registration'
|
|
? 'green'
|
|
: a === 'reregistration'
|
|
? 'cyan'
|
|
: a === 'expiration'
|
|
? 'red'
|
|
: a === 'deletion'
|
|
? 'magenta'
|
|
: a === 'transfer'
|
|
? 'orange'
|
|
: a === 'last changed'
|
|
? 'blue'
|
|
: a === 'registrar expiration'
|
|
? 'red'
|
|
: a === 'reinstantiation'
|
|
? 'purple'
|
|
: a === 'enum validation expiration' ? 'red' : 'default'
|