-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: close sidebar on button click (#82)
* feat: β¨ close sidebar on click * chore: π§ add settings into nav buttons array * fix: π render button icons again * feat: β¨ login/logout buttons close sidebar on click
- Loading branch information
1 parent
d663e8d
commit c02c96d
Showing
4 changed files
with
61 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,47 @@ | ||
<script lang="ts"> | ||
import type { ComponentType } from "svelte"; | ||
import NavButton from "./NavButton.svelte"; | ||
import AddBoxOutlineIcon from "~icons/material-symbols/add-box-outline"; | ||
import CalendarSearchOutlineIcon from "~icons/mdi/calendar-search-outline"; | ||
// import SettingsOutline from "~icons/mdi/settings-outline"; | ||
</script> | ||
// import SettingsOutlineIcon from "~icons/mdi/settings-outline"; | ||
<div class="flex flex-col gap-y-2 border-t-2 px-6 pt-6 text-gray-600 sm:px-8 md:border-0 md:p-0"> | ||
<NavButton text="New Meeting" href="/"> | ||
<AddBoxOutlineIcon class="h-7 w-7" /> | ||
</NavButton> | ||
export let handleClick: (() => void) | undefined = undefined; | ||
<NavButton text="Summary" href="/summary"> | ||
<CalendarSearchOutlineIcon class="h-7 w-7" /> | ||
</NavButton> | ||
interface NavInfo { | ||
id: number; | ||
text: string; | ||
href: string; | ||
icon: ComponentType; | ||
} | ||
<!-- <NavButton text="Settings" , href="/settings"> | ||
<SettingsOutline class="h-7 w-7" /> | ||
</NavButton> --> | ||
const NAV_BUTTONS: NavInfo[] = [ | ||
{ | ||
id: 1, | ||
text: "New Meeting", | ||
href: "/", | ||
icon: AddBoxOutlineIcon, | ||
}, | ||
{ | ||
id: 2, | ||
text: "Summary", | ||
href: "/summary", | ||
icon: CalendarSearchOutlineIcon, | ||
}, | ||
// { | ||
// id: 3, | ||
// text: "Settings", | ||
// href: "/settings", | ||
// icon: SettingsOutlineIcon, | ||
// }, | ||
]; | ||
</script> | ||
|
||
<div class="flex flex-col gap-y-2 border-t-2 px-6 pt-6 text-gray-600 sm:px-8 md:border-0 md:p-0"> | ||
{#each NAV_BUTTONS as button} | ||
<NavButton text={button.text} href={button.href} {handleClick}> | ||
<svelte:component this={button.icon} class="h-7 w-7" /> | ||
</NavButton> | ||
{/each} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters