Merge pull request #1985 from Owaiseimdad/Fix-for-status-boxes

fixed the status boxes on screen to be more responsive and better align with UI
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-04-03 12:03:31 -07:00
commit 601215fe9b
2 files changed
+12 -1

No files matched your search

+10 -1
View File
@@ -79,6 +79,11 @@ const StatBox = ({
}, },
}; };
const responsiveWidths = {
default: `calc(25% - (3 * ${theme.spacing(8)} / 4))`,
md: `calc(50% - (1 * ${theme.spacing(8)} / 2))`,
};
return ( return (
<Stack <Stack
direction="row" direction="row"
@@ -86,7 +91,11 @@ const StatBox = ({
padding: `${theme.spacing(4)} ${theme.spacing(8)}`, padding: `${theme.spacing(4)} ${theme.spacing(8)}`,
/* TODO why are we using width and min width here? */ /* TODO why are we using width and min width here? */
minWidth: 200, minWidth: 200,
width: 225, // this is for status box to be reponsive on diff screens
width: responsiveWidths.default, // Default: 4 items per row
[theme.breakpoints.down("md")]: {
width: responsiveWidths.md, // 2 items per row
},
border: 1, border: 1,
borderStyle: "solid", borderStyle: "solid",
borderRadius: 4, borderRadius: 4,
+2
View File
@@ -20,6 +20,8 @@ const StatusBoxes = ({ shouldRender, flexWrap = "nowrap", children }) => {
direction="row" direction="row"
flexWrap={flexWrap} flexWrap={flexWrap}
gap={theme.spacing(8)} gap={theme.spacing(8)}
justifyContent="space-between"
display="flex"
> >
{children} {children}
</Stack> </Stack>