feat(web): mobileNav store for off-canvas drawer state
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
// Open/close state for the off-canvas mobile navigation drawer.
|
||||||
|
// Mounted once from Shell.svelte; toggled by the hamburger button.
|
||||||
|
|
||||||
|
let _open = $state(false);
|
||||||
|
|
||||||
|
export const mobileNav = {
|
||||||
|
get value(): boolean {
|
||||||
|
return _open;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export function openMobileNav(): void {
|
||||||
|
_open = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function closeMobileNav(): void {
|
||||||
|
_open = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function toggleMobileNav(): void {
|
||||||
|
_open = !_open;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user