added tooling (eslint, typescript and prettier)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import resolveConfig from "tailwindcss/resolveConfig";
|
||||
import tailwinConfig from "../../tailwind.config";
|
||||
import resolveConfig from 'tailwindcss/resolveConfig';
|
||||
|
||||
import tailwinConfig from '../../tailwind.config';
|
||||
|
||||
// @ts-expect-error
|
||||
const config = resolveConfig(tailwinConfig);
|
||||
|
||||
@@ -7,7 +9,7 @@ export const theme = config.theme as any;
|
||||
|
||||
export function getChartColor(index: number): string {
|
||||
const chartColors: string[] = Object.keys(theme?.colors ?? {})
|
||||
.filter((key) => key.startsWith("chart-"))
|
||||
.filter((key) => key.startsWith('chart-'))
|
||||
.map((key) => theme.colors[key] as string);
|
||||
|
||||
return chartColors[index % chartColors.length]!;
|
||||
|
||||
Reference in New Issue
Block a user