update styling
This commit is contained in:
parent
b817c06fd4
commit
1472bd8116
4 changed files with 5 additions and 6 deletions
|
@ -65,7 +65,7 @@ body {
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid: auto minmax(0, 1fr) / 100%;
|
grid: 100% / 100%;
|
||||||
|
|
||||||
background-color: var(--surface-1);
|
background-color: var(--surface-1);
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { createMemo, createSignal, ParentComponent, Show, splitProps } from "sol
|
||||||
import { Dynamic } from "solid-js/web";
|
import { Dynamic } from "solid-js/web";
|
||||||
import css from "./sidebar.module.css";
|
import css from "./sidebar.module.css";
|
||||||
|
|
||||||
export const Sidebar: ParentComponent<{ as?: string, open?: boolean, name?: string } & Record<string, any>> = (props) => {
|
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']);
|
const [local, forwarded] = splitProps(props, ['as', 'open', 'name', 'class', 'label']);
|
||||||
|
|
||||||
const [open, setOpen] = createSignal(local.open ?? true);
|
const [open, setOpen] = createSignal(local.open ?? true);
|
||||||
const name = createMemo(() => local.name ?? 'sidebar');
|
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()}`}
|
title={`${open() ? 'close' : 'open'} ${name()}`}
|
||||||
>
|
>
|
||||||
<Show when={open()} fallback={<TbLayoutSidebarLeftExpand />}>
|
<Show when={open()} fallback={<TbLayoutSidebarLeftExpand />}>
|
||||||
<TbLayoutSidebarLeftCollapse />
|
<TbLayoutSidebarLeftCollapse /> {local.label}
|
||||||
</Show>
|
</Show>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,9 @@
|
||||||
grid: 100% / auto minmax(0, 1fr);
|
grid: 100% / auto minmax(0, 1fr);
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
block-size: 100%;
|
block-size: 100%;
|
||||||
padding-block: var(--padding-l);
|
|
||||||
|
|
||||||
& .sidebar {
|
& .sidebar {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
margin-block: calc(-1 * var(--padding-l));
|
|
||||||
padding: var(--padding-l);
|
padding: var(--padding-l);
|
||||||
background-color: var(--surface-2);
|
background-color: var(--surface-2);
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,5 @@
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
block-size: 100%;
|
block-size: 100%;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
|
background-color: var(--surface-1);
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue