Styling and usability fixes
This commit is contained in:
@@ -7,11 +7,13 @@ type Expandable = {[key: string]: boolean}
|
||||
let {
|
||||
id,
|
||||
collapsed = false,
|
||||
no_border,
|
||||
title,
|
||||
body,
|
||||
}: {
|
||||
id: string
|
||||
collapsed: boolean
|
||||
collapsed?: boolean
|
||||
no_border?: boolean
|
||||
title: import('svelte').Snippet
|
||||
body: import('svelte').Snippet
|
||||
} = $props();
|
||||
@@ -43,8 +45,8 @@ const toggle = (e: MouseEvent) => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="title">
|
||||
<ToggleButton bind:on={expanded} action={toggle} icon_on="arrow_drop_down" icon_off="arrow_drop_up" highlight={false} flat/>
|
||||
<div class="title" class:no_border>
|
||||
<ToggleButton bind:on={expanded} action={toggle} icon_on="arrow_drop_down" icon_off="arrow_right" highlight={false} flat/>
|
||||
|
||||
{#if !collapsed}
|
||||
{@render title()}
|
||||
@@ -63,4 +65,7 @@ const toggle = (e: MouseEvent) => {
|
||||
align-items: center;
|
||||
border-top: 1px solid var(--separator);
|
||||
}
|
||||
.no_border {
|
||||
border-top: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user