fix(widgets): replace system-resources chart tooltip with Mantine (#6729)

* fix(widgets): replace system-resources chart tooltip with Mantine Tooltip.Floating
This commit is contained in:
Bergasha authored and GitHub committed 2026-08-28 15:08:22 +10:00
1 parent 5f572f1b92
commit c18fa8cf77
7 files changed
+238 -170

No files matched your search

@@ -1,4 +1,3 @@
import { Paper, Text } from "@mantine/core";
import { IconArrowDown, IconArrowUp } from "@tabler/icons-react";
import { formatByteRate } from "@homarr/common";
@@ -39,18 +38,9 @@ export const NetworkTrafficChart = ({
chartType={hasShadow ? "area" : "line"}
labelDisplayMode={labelDisplayMode}
advanced={advanced}
tooltipProps={{
content: ({ payload }) => {
const value = payload[0] ? Number(payload[0].value) : 0;
return (
<Paper px={3} py={2} shadow="md">
<Text c="dimmed" size="xs">
{formatByteRate(Math.round(value))}
</Text>
</Paper>
);
},
}}
tooltipLabel={(index) =>
formatByteRate(Math.round(usageOverTime[index] ?? 0))
}
/>
);
};