fix: center and constrain empty placeholder layout
This commit is contained in:
1 parent
6a079704bb
commit
fd51af97fa
2 files changed
+32
-7
No files matched your search
@@ -1,19 +1,22 @@
|
|||||||
[class*="fallback__"] {
|
[class*="fallback__"] {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-top: 100px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="fallback__"] h1.MuiTypography-root {
|
[class*="fallback__"] h1.MuiTypography-root {
|
||||||
font-size: var(--env-var-font-size-large);
|
font-size: var(--env-var-font-size-large);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="fallback__"] button.MuiButtonBase-root,
|
[class*="fallback__"] button.MuiButtonBase-root,
|
||||||
[class*="fallback__"] .check {
|
[class*="fallback__"] .check {
|
||||||
width: max-content;
|
width: max-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="fallback__"] button.MuiButtonBase-root {
|
[class*="fallback__"] button.MuiButtonBase-root {
|
||||||
min-height: 34px;
|
min-height: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="fallback__"] .check span.MuiTypography-root,
|
[class*="fallback__"] .check span.MuiTypography-root,
|
||||||
[class*="fallback__"] button.MuiButtonBase-root {
|
[class*="fallback__"] button.MuiButtonBase-root {
|
||||||
font-size: var(--env-var-font-size-medium);
|
font-size: var(--env-var-font-size-medium);
|
||||||
@@ -35,6 +38,7 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
.fallback__status > .MuiStack-root {
|
|
||||||
|
.fallback__status>.MuiStack-root {
|
||||||
margin-left: var(--env-var-spacing-2);
|
margin-left: var(--env-var-spacing-2);
|
||||||
}
|
}
|
||||||
@@ -67,24 +67,43 @@ const Fallback = ({
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
position="relative"
|
position="relative"
|
||||||
|
sx={{
|
||||||
|
height: "100vh",
|
||||||
|
width: "100%",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
}}>
|
||||||
|
<Box
|
||||||
|
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.primary.lowContrast}
|
||||||
borderRadius={theme.shape.borderRadius}
|
borderRadius={theme.shape.borderRadius}
|
||||||
backgroundColor={theme.palette.primary.main}
|
backgroundColor={theme.palette.primary.main}
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
sx={{
|
sx={{
|
||||||
|
display: "flex",
|
||||||
borderStyle: "dashed",
|
borderStyle: "dashed",
|
||||||
minHeight: "calc(100vh - var(--env-var-spacing-2) * 2)",
|
height: "60vh",
|
||||||
|
width: "45%",
|
||||||
|
minWidth: "400px",
|
||||||
|
maxHeight:"700px",
|
||||||
|
maxWidth: "800px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Stack
|
<Stack
|
||||||
className={`fallback__${title?.trim().split(" ")[0]}`}
|
className={`fallback__${title?.trim().split(" ")[0]}`}
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
gap={theme.spacing(20)}
|
gap={theme.spacing(20)}
|
||||||
|
sx={{
|
||||||
|
maxHeight:"70vh",
|
||||||
|
justifyContent:"center"
|
||||||
|
|
||||||
|
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{mode === "light" ? (
|
{mode === "light" ? (
|
||||||
<Skeleton style={{ zIndex: 1 }} />
|
<Skeleton style={{ zIndex: 1 }} />
|
||||||
@@ -127,7 +146,8 @@ const Fallback = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
sx={{ alignSelf: "center" }}
|
sx={{ alignSelf: "center"
|
||||||
|
}}
|
||||||
onClick={() => navigate(link)}
|
onClick={() => navigate(link)}
|
||||||
>
|
>
|
||||||
Let's create your first {title}
|
Let's create your first {title}
|
||||||
@@ -174,6 +194,7 @@ const Fallback = ({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user