Skip to content

Commit 5a011aa

Browse files
committed
fix: make InteractiveChart tooltip dark-mode aware (#1043)
1 parent c847ed9 commit 5a011aa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/components/charts/InteractiveChart.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ export const InteractiveChart: React.FC<InteractiveChartProps> = ({
6161
};
6262
}, [resolvedTheme]);
6363

64+
const tooltipItemStyle = useMemo(() => {
65+
const isDark = resolvedTheme === 'dark';
66+
return {
67+
color: isDark ? '#f3f4f6' : '#1f2937',
68+
};
69+
}, [resolvedTheme]);
70+
6471
const renderChart = () => {
6572
switch (type) {
6673
case 'area':

0 commit comments

Comments
 (0)