UNPKG

@orchestrator-ui/orchestrator-ui-components

Version:

Library of UI Components used to display the workflow orchestrator frontend

13 lines (12 loc) 390 B
export function getTokenName(name: string | number | boolean): string { if (typeof name === 'boolean') return 'tokenConstant'; const icons: { [key: string]: string } = { Node: 'tokenNamespace', 'IP BGP Service Settings': 'tokenEnumMember', IP_PREFIX: 'tokenIP', }; if (name in icons) { return icons[name]; } return 'tokenConstant'; }