mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(SideNav): store logic moved to onMount
This commit is contained in:
parent
01970d361a
commit
57e310858e
1 changed files with 6 additions and 1 deletions
|
@ -11,8 +11,13 @@
|
||||||
/** Set to `true` to toggle the expanded state */
|
/** Set to `true` to toggle the expanded state */
|
||||||
export let isOpen = false;
|
export let isOpen = false;
|
||||||
|
|
||||||
|
import { onMount } from "svelte";
|
||||||
import { shouldRenderHamburgerMenu } from "../navStore";
|
import { shouldRenderHamburgerMenu } from "../navStore";
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
shouldRenderHamburgerMenu.set(true);
|
shouldRenderHamburgerMenu.set(true);
|
||||||
|
return () => shouldRenderHamburgerMenu.set(false);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if fixed}
|
{#if fixed}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue