Files
Checkmate/client/src/Pages/PageSpeed/Details/Components/Charts/AreaChartLegend.jsx
T

62 lines
1.4 KiB
React
Raw Normal View History

2025-01-28 15:42:46 -08:00
import { Box, Typography, Divider } from "@mui/material";
2025-09-27 14:54:55 -07:00
import Checkbox from "@/Components/v1/Inputs/Checkbox/index.jsx";
import Icon from "@/Components/v1/Icon";
2025-09-27 14:54:55 -07:00
import LegendBox from "@/Components/v1/Charts/LegendBox/index.jsx";
2025-03-17 01:16:42 +05:30
import { useTranslation } from "react-i18next";
2025-01-28 15:42:46 -08:00
import { useTheme } from "@emotion/react";
const AreaChartLegend = ({ metrics, handleMetrics }) => {
const theme = useTheme();
2025-03-17 01:16:42 +05:30
const { t } = useTranslation();
2025-01-28 15:42:46 -08:00
return (
<LegendBox
2026-01-15 23:39:26 -05:00
icon={
<Icon
name="Ruler"
size={20}
/>
}
2025-01-28 15:42:46 -08:00
header="Metrics"
>
<Box>
<Typography
fontSize={11}
fontWeight={500}
>
2025-03-17 01:16:42 +05:30
{t("shown")}
2025-01-28 15:42:46 -08:00
</Typography>
<Divider sx={{ mt: theme.spacing(2) }} />
</Box>
<Checkbox
id="accessibility-toggle"
label="Accessibility"
isChecked={metrics.accessibility}
onChange={() => handleMetrics("accessibility")}
/>
<Divider />
<Checkbox
id="best-practices-toggle"
label="Best Practices"
isChecked={metrics.bestPractices}
onChange={() => handleMetrics("bestPractices")}
/>
<Divider />
<Checkbox
id="performance-toggle"
label="Performance"
isChecked={metrics.performance}
onChange={() => handleMetrics("performance")}
/>
<Divider />
<Checkbox
id="seo-toggle"
label="Search Engine Optimization"
isChecked={metrics.seo}
onChange={() => handleMetrics("seo")}
/>
<Divider />
</LegendBox>
);
};
export default AreaChartLegend;