feat(client): unify card titles to the eyebrow style across uptime details

- StatBox titles now use the eyebrow variant (matches /uptime summary cards)
- BaseChart drops its leading icon block and renders the title via eyebrow so all chart cards share one header style
- Inside the average-response gauge, the qualitative label uses eyebrow with the status colour and the metric uses h1; the gauge track is a neutral disabled-action background so the active arc reads in light and dark
This commit is contained in:
gorkem-bwl committed 2026-04-26 01:56:22 -04:00
1 parent a4f69daae7
commit bf3bd50624
3 files changed
+16 -33

No files matched your search

@@ -8,7 +8,7 @@ import type { ResponsiveStyleValue } from "@mui/system";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
type BaseChartProps = React.PropsWithChildren<{ type BaseChartProps = React.PropsWithChildren<{
icon: React.ReactNode; icon?: React.ReactNode;
title: string; title: string;
width?: number | string; width?: number | string;
maxWidth?: number | string; maxWidth?: number | string;
@@ -17,7 +17,6 @@ type BaseChartProps = React.PropsWithChildren<{
export const BaseChart = ({ export const BaseChart = ({
children, children,
icon,
title, title,
width = "100%", width = "100%",
maxWidth = "100%", maxWidth = "100%",
@@ -38,34 +37,12 @@ export const BaseChart = ({
gap={theme.spacing(LAYOUT.MD)} gap={theme.spacing(LAYOUT.MD)}
flex={1} flex={1}
> >
<Stack <Typography
direction="row" variant="eyebrow"
alignItems={"center"} color="text.secondary"
gap={theme.spacing(LAYOUT.XS)}
> >
{icon && ( {title}
<BaseBox </Typography>
sx={{
display: "flex",
alignItems: "center",
justifyContent: "center",
width: 34,
height: 34,
backgroundColor: theme.palette.action.hover,
"& svg": {
width: 20,
height: 20,
"& path": {
stroke: theme.palette.text.secondary,
},
},
}}
>
{icon}
</BaseBox>
)}
<Typography variant="h2">{title}</Typography>
</Stack>
<Box flex={1}>{children}</Box> <Box flex={1}>{children}</Box>
</Stack> </Stack>
</BaseBox> </BaseBox>
@@ -69,7 +69,12 @@ export const StatBox = ({
> >
<Stack onClick={onClick}> <Stack onClick={onClick}>
<Box sx={{ display: "flex", alignItems: "center", gap: theme.spacing(2) }}> <Box sx={{ display: "flex", alignItems: "center", gap: theme.spacing(2) }}>
<Typography color={textColor}>{title}</Typography> <Typography
variant="eyebrow"
color={palette ? textColor : "text.secondary"}
>
{title}
</Typography>
{tooltip && ( {tooltip && (
<TooltipWithInfo <TooltipWithInfo
title={tooltip} title={tooltip}
@@ -52,7 +52,7 @@ export const RadialAvgResponse = ({ avg, max }: { avg: number; max: number }) =>
> >
<RadialBar <RadialBar
dataKey="value" dataKey="value"
background={{ fill: theme.palette[palette].light }} background={{ fill: theme.palette.action.disabledBackground }}
> >
<Cell visibility={"hidden"} /> <Cell visibility={"hidden"} />
<Cell fill={theme.palette[palette].main} /> <Cell fill={theme.palette[palette].main} />
@@ -75,13 +75,14 @@ export const RadialAvgResponse = ({ avg, max }: { avg: number; max: number }) =>
}} }}
> >
<Typography <Typography
variant="h6" variant="eyebrow"
color={theme.palette[palette].main}
textAlign={"center"} textAlign={"center"}
> >
{msg[palette]} {msg[palette]}
</Typography> </Typography>
<Typography <Typography
variant="h6" variant="h1"
textAlign={"center"} textAlign={"center"}
>{`${avg?.toFixed()}ms`}</Typography> >{`${avg?.toFixed()}ms`}</Typography>
</Stack> </Stack>