update styling
This commit is contained in:
parent
b817c06fd4
commit
1472bd8116
4 changed files with 5 additions and 6 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue