add an optional Icon to statbox

This commit is contained in:
Alex Holliday committed 2025-02-19 13:36:29 -08:00
1 parent fd6fb71ec8
commit 3818c9e5a6
1 file changed
+4
+4
View File
@@ -32,6 +32,7 @@ import useUtils from "../../Pages/Uptime/Monitors/Hooks/useUtils";
const StatBox = ({
img,
icon: Icon,
alt,
heading,
subHeading,
@@ -114,6 +115,9 @@ const StatBox = ({
sx={{ marginRight: theme.spacing(8) }}
/>
)}
{Icon && (
<Icon sx={{ width: "30px", height: "30px", marginRight: theme.spacing(8) }} />
)}
<Stack>
<Typography component="h2">{heading}</Typography>
<Typography>{subHeading}</Typography>