themebuilder: fix builder layout with app on the side

This commit is contained in:
Abdullah Atta
2023-08-08 13:42:28 +05:00
parent c8a77934f2
commit 4b74cba4e4
3 changed files with 9 additions and 8 deletions

View File

@@ -123,14 +123,17 @@ export default function ThemeBuilder() {
return loading ? null : (
<Flex
sx={{
width: 300,
width: 260,
flexShrink: 0,
bg: "background",
display: "flex",
overflow: "hidden",
flexDirection: "column",
overflowY: "scroll",
padding: "10px 0px",
rowGap: "10px"
pt: 2,
rowGap: 2,
borderLeft: "1px solid var(--border)",
zIndex: 999
}}
>
<Flex

View File

@@ -34,7 +34,8 @@ async function renderApp() {
sx={{
display: "flex",
"#app": { flex: 1, height: "unset" },
height: path === "default" ? "100%" : "unset"
"& > :first-child": { flex: 1 },
height: "100%"
}}
>
<Component route={props?.route || "login:email"} />

View File

@@ -35,10 +35,7 @@ async function renderApp() {
const { default: Component } = await component();
logger.measure("app render");
render(
<BaseThemeProvider
addGlobalStyles
sx={{ height: path === "default" ? "100%" : "unset" }}
>
<BaseThemeProvider addGlobalStyles sx={{ height: "100%" }}>
<Component route={props?.route || "login:email"} />
</BaseThemeProvider>,
document.getElementById("root"),