fix(ui): quirks with sidebar sizing

This commit is contained in:
Brian McGee
2025-08-28 15:56:37 +01:00
parent 2ed3608e34
commit 0cc9b91ae8
4 changed files with 11 additions and 12 deletions

View File

@@ -1,7 +1,3 @@
.sidebar { .sidebar {
@apply w-60 border-none z-10; @apply w-60 border-none z-10 h-full flex flex-col;
.body {
@apply pt-4 pb-3 px-2;
}
} }

View File

@@ -2,6 +2,7 @@ import styles from "./Sidebar.module.css";
import { SidebarHeader } from "@/src/components/Sidebar/SidebarHeader"; import { SidebarHeader } from "@/src/components/Sidebar/SidebarHeader";
import { SidebarBody } from "@/src/components/Sidebar/SidebarBody"; import { SidebarBody } from "@/src/components/Sidebar/SidebarBody";
import cx from "classnames"; import cx from "classnames";
import { splitProps } from "solid-js";
export interface LinkProps { export interface LinkProps {
path: string; path: string;
@@ -19,10 +20,12 @@ export interface SidebarProps {
} }
export const Sidebar = (props: SidebarProps) => { export const Sidebar = (props: SidebarProps) => {
const [bodyProps] = splitProps(props, ["staticSections"]);
return ( return (
<div class={cx(styles.sidebar, props.class)}> <div class={cx(styles.sidebar, props.class)}>
<SidebarHeader /> <SidebarHeader />
<SidebarBody class={cx(styles.body)} {...props} /> <SidebarBody {...bodyProps} />
</div> </div>
); );
}; };

View File

@@ -7,9 +7,7 @@
@apply min-w-96; @apply min-w-96;
} }
.sidebar { .sidebarContainer {
@apply absolute left-4 top-[2.25rem] w-60; @apply absolute left-4 top-4 w-60 z-10;
@apply min-h-96; height: calc(100vh - 2rem);
height: calc(100vh - 7.5rem);
} }

View File

@@ -119,7 +119,9 @@ export const Clan: Component<RouteSectionProps> = (props) => {
) )
} }
> >
<Sidebar class={cx(styles.sidebar)} /> <div class={styles.sidebarContainer}>
<Sidebar />
</div>
{props.children} {props.children}
<ClanSceneController {...props} /> <ClanSceneController {...props} />
</ClanContext.Provider> </ClanContext.Provider>