MCPcopy Index your code
hub / github.com/Codehagen/Badget / getColorClassName

Function getColorClassName

src/lib/chartUtils.ts:95–106  ·  view source on GitHub ↗
(
  color: AvailableChartColorsKeys,
  type: ColorUtility,
)

Source from the content-addressed store, hash-verified

93}
94
95export const getColorClassName = (
96 color: AvailableChartColorsKeys,
97 type: ColorUtility,
98): string => {
99 const fallbackColor = {
100 bg: "bg-gray-500",
101 stroke: "stroke-gray-500",
102 fill: "fill-gray-500",
103 text: "text-gray-500",
104 }
105 return chartColors[color]?.[type] ?? fallbackColor[type]
106}
107
108// Tremor getYAxisDomain [v0.0.0]
109

Callers 6

LegendItemFunction · 0.90
ChartTooltipFunction · 0.90
ComboChart.tsxFile · 0.90
LegendItemFunction · 0.90
ChartTooltipFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected