@functionalcms/svelte-components 5.12.3 → 5.12.4
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { MenuItem, MenuSection } from './menuItems.js';
|
|
4
4
|
import Icon from '../Icon.svelte';
|
|
5
|
+
import { OutlinedIcons } from '../icons.js';
|
|
5
6
|
import { afterNavigate } from '$app/navigation';
|
|
6
7
|
import {
|
|
7
8
|
Sidebar,
|
|
@@ -13,7 +14,6 @@
|
|
|
13
14
|
uiHelpers,
|
|
14
15
|
SidebarBrand
|
|
15
16
|
} from 'flowbite-svelte';
|
|
16
|
-
import { OutlinedIcons } from '../icons.js';
|
|
17
17
|
|
|
18
18
|
interface TwoColumnLayoutProps {
|
|
19
19
|
children: Snippet;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import Icon from '../Icon.svelte';
|
|
3
|
+
import { OutlinedIcons } from '../icons.js';
|
|
2
4
|
import type { Snippet } from "svelte";
|
|
3
5
|
|
|
4
6
|
interface Props {
|
|
@@ -15,6 +17,7 @@
|
|
|
15
17
|
|
|
16
18
|
let asideWidth = $state(initialWidth);
|
|
17
19
|
let isCollapsed = $state(false);
|
|
20
|
+
let icon = $derived(isCollapsed ? OutlinedIcons.ChevronDoubleRight : OutlinedIcons.ChevronDoubleLeft);
|
|
18
21
|
|
|
19
22
|
const toggleCollapse = () => {
|
|
20
23
|
isCollapsed = !isCollapsed;
|
|
@@ -38,7 +41,7 @@
|
|
|
38
41
|
onclick={toggleCollapse}
|
|
39
42
|
aria-label={isCollapsed ? "Expand sidebar" : "Collapse sidebar"}
|
|
40
43
|
>
|
|
41
|
-
{
|
|
44
|
+
<Icon icon={icon} />
|
|
42
45
|
</button>
|
|
43
46
|
|
|
44
47
|
<main class="resizable-main">
|