feat(client): split uptime monitor creation into a 3-step wizard

This commit is contained in:
Br0wnHammer committed 2026-05-27 01:07:48 +05:30
1 parent 1702fd1c5a
commit 967e415b0a
3 files changed
+168 -149

No files matched your search

@@ -14,29 +14,30 @@ export const StepProgress = ({ steps, current }: StepProgressProps) => {
const activeBg = `linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.primary.main} 100%)`;
const completedBg = `linear-gradient(135deg, ${alpha(theme.palette.primary.light, 0.5)} 0%, ${alpha(theme.palette.primary.main, 0.5)} 100%)`;
const getSegmentBackground = (index: number) => {
if (index < current) return completedBg;
if (index === current) return activeBg;
return theme.palette.divider;
};
return (
<Stack
direction="row"
gap={theme.spacing(LAYOUT.XS)}
width="100%"
>
{Array.from({ length: steps }).map((_, index) => {
const background =
index < current
? completedBg
: index === current
? activeBg
: theme.palette.divider;
return (
<Box
key={index}
flex={1}
height={theme.spacing(LAYOUT.XXS)}
borderRadius={theme.shape.borderRadius}
sx={{ background, transition: "background 0.2s ease" }}
/>
);
})}
{Array.from({ length: steps }).map((_, index) => (
<Box
key={index}
flex={1}
height={theme.spacing(LAYOUT.XXS)}
borderRadius={theme.shape.borderRadius}
sx={{
background: getSegmentBackground(index),
transition: "background 0.2s ease",
}}
/>
))}
</Stack>
);
};