Updated theme handling.

This commit is contained in:
Mike Cao 2025-04-01 22:58:38 -05:00
parent c71e9b5707
commit 34a8fa100c
10 changed files with 57 additions and 93 deletions

View file

@ -1,8 +1,9 @@
import { useMemo, useState } from 'react';
import { useTheme } from '@umami/react-zen';
import { BarChartTooltip } from '@/components/charts/BarChartTooltip';
import { Chart, ChartProps } from '@/components/charts/Chart';
import { useTheme } from '@/components/hooks';
import { renderNumberLabels } from '@/lib/charts';
import { getThemeColors } from '@/lib/colors';
export interface BarChartProps extends ChartProps {
unit: string;
@ -19,7 +20,8 @@ export interface BarChartProps extends ChartProps {
export function BarChart(props: BarChartProps) {
const [tooltip, setTooltip] = useState(null);
const { colors } = useTheme();
const { theme } = useTheme();
const { colors } = getThemeColors(theme);
const {
renderXLabel,
renderYLabel,