Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adobe/react-spectrum
/ getColor
Function
getColor
starters/tailwind/src/Meter.tsx:47–57 ·
view source on GitHub ↗
(percentage: number)
Source
from the content-addressed store, hash-verified
45
}
46
47
function getColor(percentage: number) {
48
if (percentage < 70) {
49
return
'bg-green-600'
;
50
}
51
52
if (percentage < 80) {
53
return
'bg-orange-500'
;
54
}
55
56
return
'bg-red-600'
;
57
}
Callers
1
Meter
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected