MCPcopy Create free account
hub / github.com/Snapchat/dagger-browser / getNodeIcon

Function getNodeIcon

browser/src/components/NodeIcon.tsx:22–39  ·  view source on GitHub ↗
(
  kind: string | null | undefined
)

Source from the content-addressed store, hash-verified

20
21// TODO: Make this configurable
22let 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
41export default NodeIcon;

Callers 1

NodeIconFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected