mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26: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 */
|
||||
export let isOpen = false;
|
||||
|
||||
import { onMount } from "svelte";
|
||||
import { shouldRenderHamburgerMenu } from "../navStore";
|
||||
shouldRenderHamburgerMenu.set(true);
|
||||
|
||||
onMount(() => {
|
||||
shouldRenderHamburgerMenu.set(true);
|
||||
return () => shouldRenderHamburgerMenu.set(false);
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if fixed}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue