Skip to content

Commit

Permalink
update exports
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed May 16, 2024
1 parent 2f5e83b commit ec2fc7f
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/utils/chartColors.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Tremor Raw chartColors [v0.0.0]

type ColorUtility = "bg" | "stroke" | "fill" | "text"
export type ColorUtility = "bg" | "stroke" | "fill" | "text"

const chartColors = {
export const chartColors = {
blue: {
bg: "bg-blue-500",
stroke: "stroke-blue-500",
Expand Down Expand Up @@ -51,13 +51,13 @@ const chartColors = {
}
}

type AvailableChartColorsKeys = keyof typeof chartColors
export type AvailableChartColorsKeys = keyof typeof chartColors

const AvailableChartColors: AvailableChartColorsKeys[] = Object.keys(
export const AvailableChartColors: AvailableChartColorsKeys[] = Object.keys(
chartColors,
) as Array<AvailableChartColorsKeys>

const constructCategoryColors = (
export const constructCategoryColors = (
categories: string[],
colors: AvailableChartColorsKeys[],
): Map<string, AvailableChartColorsKeys> => {
Expand All @@ -68,7 +68,7 @@ const constructCategoryColors = (
return categoryColors
}

const getColorClassName = (
export const getColorClassName = (
color: AvailableChartColorsKeys,
type: ColorUtility,
): string => {
Expand All @@ -80,12 +80,3 @@ const getColorClassName = (
}
return chartColors[color]?.[type] ?? fallbackColor[type]
}

export {
chartColors,
AvailableChartColors,
constructCategoryColors,
getColorClassName,
type ColorUtility,
type AvailableChartColorsKeys,
}

0 comments on commit ec2fc7f

Please sign in to comment.