Skip to content

Instantly share code, notes, and snippets.

@shinokada
Created October 8, 2022 06:45
Show Gist options
  • Save shinokada/97c8918de11071dd0458494baa75e7f7 to your computer and use it in GitHub Desktop.
Save shinokada/97c8918de11071dd0458494baa75e7f7 to your computer and use it in GitHub Desktop.
<script>
$: toggleSide = () => {
if (width >= breakPoint) {
drawerHidden = false;
} else {
drawerHidden = true;
}
};
</script>
{#each data.pages as { meta, path }}
<SidebarItem label={meta.title} href={`/pages${path}`} {spanClass} on:click={toggleSide} />
{/each}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment