Create comonent for collapsing menu entries

This commit is contained in:
2026-02-12 19:42:23 +01:00
parent 6a19b5bc18
commit ec1c8b0f5b
7 changed files with 192 additions and 125 deletions

View File

@@ -6,6 +6,7 @@ let {
group_first = false,
group_middle = false,
group_last = false,
highlight = true,
action,
children,
}: {
@@ -15,6 +16,7 @@ let {
group_first?: boolean;
group_middle?: boolean;
group_last?: boolean;
highlight?: boolean;
action?: (e: MouseEvent) => void;
children?: import('svelte').Snippet;
} = $props();
@@ -31,7 +33,7 @@ const click = (e: MouseEvent) => {
onclick={click}
type="button"
class="button"
class:button_highlight={on}
class:button_highlight={on && highlight}
class:group_first
class:group_middle
class:group_last