Skip to content

Commit 6c00adb

Browse files
committed
fix: icon center
1 parent 6f4a2ef commit 6c00adb

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

platforms/metagram/src/lib/fragments/SideBar/SideBar.svelte

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import Button from '$lib/ui/Button/Button.svelte';
77
import { cn } from '$lib/utils';
88
9-
interface IBottomNavProps extends HTMLAttributes<HTMLElement> {
9+
interface ISideBarProps extends HTMLAttributes<HTMLElement> {
1010
activeTab?: string;
1111
profileSrc: string;
1212
handlePost?: () => Promise<void>;
@@ -16,7 +16,7 @@
1616
profileSrc = 'https://picsum.photos/200',
1717
handlePost,
1818
...restProps
19-
}: IBottomNavProps = $props();
19+
}: ISideBarProps = $props();
2020
2121
let _activeTab = $derived(page.url.pathname);
2222
@@ -57,7 +57,9 @@
5757
: 'var(--color-black-400)'}
5858
fill={activeTab === 'home' ? 'var(--color-brand-burnt-orange)' : 'white'}
5959
/>
60-
<h3 class={`${activeTab === 'home' ? 'text-brand-burnt-orange' : 'text-black-800'}`}>
60+
<h3
61+
class={`${activeTab === 'home' ? 'text-brand-burnt-orange' : 'text-black-800'} mt-[4px]`}
62+
>
6163
Feed
6264
</h3>
6365
</button>
@@ -76,7 +78,7 @@
7678
fill={activeTab === 'discover' ? 'var(--color-brand-burnt-orange)' : 'white'}
7779
/>
7880
<h3
79-
class={`${activeTab === 'discover' ? 'text-brand-burnt-orange' : 'text-black-800'}`}
81+
class={`${activeTab === 'discover' ? 'text-brand-burnt-orange' : 'text-black-800'} mt-[4px]`}
8082
>
8183
Search
8284
</h3>
@@ -95,7 +97,9 @@
9597
: 'var(--color-black-400)'}
9698
fill={activeTab === 'post' ? 'var(--color-brand-burnt-orange)' : 'white'}
9799
/>
98-
<h3 class={`${activeTab === 'post' ? 'text-brand-burnt-orange' : 'text-black-800'}`}>
100+
<h3
101+
class={`${activeTab === 'post' ? 'text-brand-burnt-orange' : 'text-black-800'} mt-[4px]`}
102+
>
99103
Upload a photo
100104
</h3>
101105
</button>
@@ -114,7 +118,7 @@
114118
fill={activeTab === 'messages' ? 'var(--color-brand-burnt-orange)' : 'white'}
115119
/>
116120
<h3
117-
class={`${activeTab === 'messages' ? 'text-brand-burnt-orange' : 'text-black-800'}`}
121+
class={`${activeTab === 'messages' ? 'text-brand-burnt-orange' : 'text-black-800'} mt-[4px]`}
118122
>
119123
Messages
120124
</h3>
@@ -137,7 +141,9 @@
137141
alt="profile"
138142
/>
139143
</span>
140-
<h3 class={`${activeTab === 'profile' ? 'text-brand-burnt-orange' : 'text-black-800'}`}>
144+
<h3
145+
class={`${activeTab === 'profile' ? 'text-brand-burnt-orange' : 'text-black-800'} mt-[4px]`}
146+
>
141147
Profile
142148
</h3>
143149
</button>

platforms/metagram/src/routes/+layout.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
onNavigate((navigation) => {
1111
if (!document.startViewTransition) return;
1212
if (!window.matchMedia('(max-width: 768px)').matches) {
13-
return;
14-
}
13+
return;
14+
}
1515
1616
const currentRoute = navigation.from?.url.pathname;
1717
const targetRoute = navigation.to?.url.pathname;

0 commit comments

Comments
 (0)