( kind: string | null | undefined )
| 20 | |
| 21 | // TODO: Make this configurable |
| 22 | let getNodeIcon = ( |
| 23 | kind: string | null | undefined |
| 24 | ): { label: string; color: string } | undefined => { |
| 25 | switch (kind) { |
| 26 | case "INSTANCE": { |
| 27 | return { label: "I", color: "deep-purple" }; |
| 28 | } |
| 29 | case "PROVIDER": { |
| 30 | return { label: "P", color: "blue" }; |
| 31 | } |
| 32 | case "LAZY": { |
| 33 | return { label: "L", color: "indigo" }; |
| 34 | } |
| 35 | default: { |
| 36 | return undefined; |
| 37 | } |
| 38 | } |
| 39 | }; |
| 40 | |
| 41 | export default NodeIcon; |