1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-15 05:34:05 +02:00

Add icons in the mobile sidebar menu

This commit is contained in:
Kamran Ahmed
2023-05-26 17:31:10 +01:00
parent 718c582a8c
commit c72658938f

View File

@@ -41,7 +41,7 @@ const sidebarLinks = [
<div class='relative mb-5 block border-b p-4 shadow-inner md:hidden'> <div class='relative mb-5 block border-b p-4 shadow-inner md:hidden'>
<button <button
class='flex h-10 w-full items-center justify-between rounded-md border bg-white px-2 text-center font-medium text-gray-900' class='flex h-10 w-full items-center justify-between rounded-md border bg-white px-2 text-center text-gray-900 text-sm font-medium'
id='settings-menu' id='settings-menu'
> >
{activePageTitle} {activePageTitle}
@@ -56,10 +56,11 @@ const sidebarLinks = [
<li> <li>
<a <a
href={sidebarLink.href} href={sidebarLink.href}
class={`block w-full rounded px-2 py-1.5 font-medium text-slate-900 hover:bg-slate-200 ${ class={`flex items-center w-full rounded px-3 py-1.5 text-slate-900 hover:bg-slate-200 text-sm ${
activePageId === sidebarLink.id ? 'bg-slate-100' : '' activePageId === sidebarLink.id ? 'bg-slate-100' : ''
}`} }`}
> >
<AstroIcon icon={sidebarLink.icon.glyph} class={`${sidebarLink.icon.classes} mr-2`} />
{sidebarLink.title} {sidebarLink.title}
</a> </a>
</li> </li>