monitor select

This commit is contained in:
Alex Holliday committed 2026-01-27 23:05:00 +00:00
1 parent f88e4ee6f4
commit f3ba8c9815
4 files changed
+197 -20

No files matched your search

@@ -4,12 +4,16 @@ import Box from "@mui/material/Box";
import { BaseBox } from "@/Components/v2/design-elements";
import Background from "@/assets/Images/background-grid.svg?react";
import { useTranslation } from "react-i18next";
import type { SxProps } from "@mui/material";
import { useTheme } from "@mui/material/styles";
type StatusBoxProps = React.PropsWithChildren<{ children: React.ReactNode }>;
type StatusBoxProps = React.PropsWithChildren<{
children: React.ReactNode;
sx?: SxProps;
}>;
export const BGBox = ({ children }: StatusBoxProps) => {
export const BGBox = ({ children, sx }: StatusBoxProps) => {
const theme = useTheme();
return (
<BaseBox
@@ -18,6 +22,7 @@ export const BGBox = ({ children }: StatusBoxProps) => {
position: "relative",
flex: 1,
padding: theme.spacing(4),
...sx,
}}
>
<Box
@@ -36,14 +41,16 @@ const StatusBox = ({
label,
n,
color,
sx,
}: {
label: string;
n: number;
color: string | undefined;
sx?: SxProps;
}) => {
const theme = useTheme();
return (
<BGBox>
<BGBox sx={sx}>
<Stack spacing={theme.spacing(4)}>
<Typography
variant={"h2"}
@@ -106,6 +113,9 @@ export const TotalChecksBox = ({ n }: { n: number }) => {
label={t("pages.common.monitors.status.total")}
n={n}
color={theme.palette.primary.light}
sx={{
maxWidth: "300px",
}}
/>
);
};
@@ -117,6 +127,9 @@ export const DownChecksBox = ({ n }: { n: number }) => {
label={t("pages.common.monitors.status.down")}
n={n}
color={theme.palette.error.light}
sx={{
maxWidth: "300px",
}}
/>
);
};