Skip to content

Commit

Permalink
Update mobile sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
ernstmul committed Jan 15, 2025
1 parent 30a574e commit 1298bf4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Navbar, Icon, Layout, Link, Tooltip } from '@appwrite.io/pink-svelte';
import { toggleCommandCenter } from '$lib/commandCenter/commandCenter.svelte';
import type { BaseNavbarProps } from '@appwrite.io/pink-svelte/dist/navbar/Base.svelte';
import { IconBell, IconMenuAlt4, IconSearch } from '@appwrite.io/pink-icons-svelte';
import { IconMenuAlt4, IconSearch } from '@appwrite.io/pink-icons-svelte';
import { DropList, Support, BreadcrumbsConsole } from '$lib/components';
import { Feedback } from '$lib/components/feedback';
import { feedback } from '$lib/stores/feedback';
Expand Down
16 changes: 12 additions & 4 deletions src/lib/components/sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
IconSearch,
IconUserGroup
} from '@appwrite.io/pink-icons-svelte';
import { toggleCommandCenter } from '$lib/commandCenter/commandCenter.svelte';
type $$Props = HTMLElement & {
state?: 'closed' | 'open' | 'icons';
Expand All @@ -31,12 +32,14 @@
title: string;
percentage: number;
};
sideBarIsOpen: boolean;
};
export let state: $$Props['state'] = 'closed';
export let project: $$Props['project'];
export let avatar: $$Props['avatar'];
export let progressCard: $$Props['progressCard'];
export let sideBarIsOpen: boolean;
const projectOptions = [
{ name: 'Auth', icon: IconUserGroup, slug: 'auth' },
Expand All @@ -53,10 +56,14 @@
<div slot="top">
<div class="only-mobile top">
<div class="icons">
<Link.Button variant="quiet-muted"
><div class="icon"><Icon icon={IconSearch} /></div></Link.Button>
<Link.Button variant="quiet-muted"
><div class="icon"><Icon icon={IconBell} /></div></Link.Button>
<Link.Button
variant="quiet-muted"
on:click={() => {
toggleCommandCenter();
state = 'closed';
sideBarIsOpen = false;
}}>
<div class="icon"><Icon icon={IconSearch} /></div></Link.Button>
</div>
<Link.Button><img src={avatar} alt={'Avatar'} class="avatar" /></Link.Button>
</div>
Expand Down Expand Up @@ -364,5 +371,6 @@
.divider {
margin-block: var(--space-2, 4px);
width: 100%;
}
</style>
1 change: 1 addition & 0 deletions src/lib/layout/shell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Sidebar
project={projects.find((project) => project.isSelected)}
avatar={navbarProps.avatar}
bind:sideBarIsOpen
bind:state />
{/if}

Expand Down

0 comments on commit 1298bf4

Please sign in to comment.