Files
Checkmate/client/src/components/status-pages/StatusHeader.tsx
T

28 lines
801 B
TypeScript
Raw Normal View History

2025-11-13 13:47:26 -08:00
import Typography from "@mui/material/Typography";
import Stack from "@mui/material/Stack";
import { getStatusPageHeaderConfig } from "@/utils/MonitorUtils";
import type { IStatusPageWithMonitors } from "@/types/status-page";
import { useTheme } from "@mui/material/styles";
export const StatusHeader = ({
statusPage,
}: {
statusPage: IStatusPageWithMonitors;
}) => {
const theme = useTheme();
const headerConfig = getStatusPageHeaderConfig(statusPage?.monitors || []);
return (
<Stack
width={"100%"}
bgcolor={theme.palette[headerConfig.paletteKey].lowContrast}
borderRadius={theme.shape.borderRadius}
padding={theme.spacing(4)}
>
<Typography variant="h2" alignSelf={"center"}>
{headerConfig.message}
</Typography>
</Stack>
);
};