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

Function getWeightColor

browser/src/components/NodeWeight.tsx:28–36  ·  view source on GitHub ↗
(weight: Weight)

Source from the content-addressed store, hash-verified

26};
27
28const getWeightColor = (weight: Weight): string => {
29 if (weight.value > weight.largeThreshold) {
30 return "red";
31 } else if (weight.value > weight.smallThreshold) {
32 return "orange";
33 } else {
34 return "green";
35 }
36};
37
38export default NodeWeight;

Callers 1

NodeWeightFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected