@makolabs/ripple 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { resolve } from '$app/paths';
|
|
7
7
|
import { buildTestId } from '../../helper/testid.js';
|
|
8
8
|
|
|
9
|
-
let { items = [], logo, footer, testId }: SidebarProps = $props();
|
|
9
|
+
let { items = [], logo, belowLogo, footer, testId }: SidebarProps = $props();
|
|
10
10
|
let menubar: MenuBar = $state({
|
|
11
11
|
collapsed: false
|
|
12
12
|
});
|
|
@@ -115,6 +115,15 @@
|
|
|
115
115
|
</button>
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
|
+
{#if belowLogo}
|
|
119
|
+
<div
|
|
120
|
+
class="shrink-0 border-b border-white/10 px-3 py-3"
|
|
121
|
+
data-testid={buildTestId('sidebar', 'below-logo', testId)}
|
|
122
|
+
>
|
|
123
|
+
{@render belowLogo({ collapsed: menubar.collapsed })}
|
|
124
|
+
</div>
|
|
125
|
+
{/if}
|
|
126
|
+
|
|
118
127
|
<div class="flex flex-1 flex-col overflow-y-auto bg-gradient-to-b from-transparent to-black/20">
|
|
119
128
|
<nav class="flex-1 space-y-6 px-2 py-4">
|
|
120
129
|
{#each navigationItems as item, index (index)}
|
|
@@ -51,6 +51,10 @@ export interface NavItemProps {
|
|
|
51
51
|
export interface SidebarProps {
|
|
52
52
|
items?: NavigationItem[];
|
|
53
53
|
logo: LogoType;
|
|
54
|
+
/** Optional snippet between the logo row and the navigation (receives collapse state) */
|
|
55
|
+
belowLogo?: Snippet<[{
|
|
56
|
+
collapsed: boolean;
|
|
57
|
+
}]>;
|
|
54
58
|
/** Optional footer snippet rendered at the bottom of the sidebar */
|
|
55
59
|
footer?: Snippet<[{
|
|
56
60
|
collapsed: boolean;
|