update styling

This commit is contained in:
Chris Kruining 2024-10-23 14:02:25 +02:00
parent b817c06fd4
commit 1472bd8116
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
4 changed files with 5 additions and 6 deletions

View file

@ -65,7 +65,7 @@ body {
overflow: clip;
display: grid;
grid: auto minmax(0, 1fr) / 100%;
grid: 100% / 100%;
background-color: var(--surface-1);

View file

@ -3,8 +3,8 @@ import { createMemo, createSignal, ParentComponent, Show, splitProps } from "sol
import { Dynamic } from "solid-js/web";
import css from "./sidebar.module.css";
export const Sidebar: ParentComponent<{ as?: string, open?: boolean, name?: string } & Record<string, any>> = (props) => {
const [local, forwarded] = splitProps(props, ['as', 'open', 'name', 'class']);
export const Sidebar: ParentComponent<{ as?: string, open?: boolean, name?: string, label?: string } & Record<string, any>> = (props) => {
const [local, forwarded] = splitProps(props, ['as', 'open', 'name', 'class', 'label']);
const [open, setOpen] = createSignal(local.open ?? true);
const name = createMemo(() => local.name ?? 'sidebar');
@ -16,7 +16,7 @@ export const Sidebar: ParentComponent<{ as?: string, open?: boolean, name?: stri
title={`${open() ? 'close' : 'open'} ${name()}`}
>
<Show when={open()} fallback={<TbLayoutSidebarLeftExpand />}>
<TbLayoutSidebarLeftCollapse />
<TbLayoutSidebarLeftCollapse /> {local.label}
</Show>
</button>

View file

@ -3,11 +3,9 @@
grid: 100% / auto minmax(0, 1fr);
inline-size: 100%;
block-size: 100%;
padding-block: var(--padding-l);
& .sidebar {
z-index: 1;
margin-block: calc(-1 * var(--padding-l));
padding: var(--padding-l);
background-color: var(--surface-2);

View file

@ -4,4 +4,5 @@
inline-size: 100%;
block-size: 100%;
overflow: clip;
background-color: var(--surface-1);
}