import Tooltip from "@mui/material/Tooltip"; import Box from "@mui/material/Box"; import type { SxProps, Theme } from "@mui/material/styles"; import { useTranslation } from "react-i18next"; import { mergeSx } from "@/Utils/mergeSx"; import type { ChartCell, HeatCellKind, } from "@/Pages/StatusPage/Status/themes/shared/ChartCells"; interface Props { cells: ChartCell[]; containerSx: SxProps; cellSx: (kind: HeatCellKind, severity?: number) => SxProps; onCellClick?: (date: string) => void; } export const ThemedHeatmap = ({ cells, containerSx, cellSx, onCellClick }: Props) => { const { t } = useTranslation(); return ( {cells.map((cell) => { if (cell.heatKind === "empty") { return ( { if (cell.date && onCellClick) { onCellClick(cell.date); } }} /> ); } return ( { if (cell.date && onCellClick) { onCellClick(cell.date); } }} /> ); })} ); };