Node.js minimum versions is now 18.18.0.

Updated other dependencies and run linting fixes.
This commit is contained in:
gbuomprisco
2024-10-29 11:07:47 +08:00
parent 81e468adc0
commit f9bd5b3802
6 changed files with 44 additions and 96 deletions

View File

@@ -9,15 +9,13 @@ import { cn } from '../lib/utils';
// Format: { THEME_NAME: CSS_SELECTOR }
const THEMES = { light: '', dark: '.dark' } as const;
export type ChartConfig = {
[k in string]: {
export type ChartConfig = Record<string, {
label?: React.ReactNode;
icon?: React.ComponentType;
} & (
| { color?: string; theme?: never }
| { color?: never; theme: Record<keyof typeof THEMES, string> }
);
};
)>;
type ChartContextProps = {
config: ChartConfig;