MCPcopy Create free account
hub / github.com/TanStack/query / getQueryStatusColorByLabel

Function getQueryStatusColorByLabel

packages/query-devtools/src/utils.tsx:97–107  ·  view source on GitHub ↗
(label: QueryStatusLabel)

Source from the content-addressed store, hash-verified

95 * @returns The color name.
96 */
97export function getQueryStatusColorByLabel(label: QueryStatusLabel) {
98 return label === 'fresh'
99 ? 'green'
100 : label === 'stale'
101 ? 'yellow'
102 : label === 'paused'
103 ? 'purple'
104 : label === 'inactive'
105 ? 'gray'
106 : 'blue'
107}
108
109/**
110 * Displays a string regardless of the type of the data.

Callers 2

QueryDetailsFunction · 0.90
utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected