Finished the navigation menu

- Added a NavItem component
- Replaced the navbar toggle icon
- Made the navbar tighter
- Fixed the navbar's padding
- Render the nav items dynamically
This commit is contained in:
tsommer committed 2022-08-10 21:05:38 +02:00
1 parent 458fe0ba88
commit 4b62e5265c
5 files changed
+55 -15

No files matched your search

@@ -0,0 +1,9 @@
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="@this.Route">
@if (this.ShowIcon)
{
<Icon Filename="@this.IconFilename" Size="25" AltText="@this.AltText" />
}
<span class="ms-1 align-middle">@this.Text</span>
</a>
</li>
@@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Components;
namespace UI_MAUI.Components;
public partial class NavItem : ComponentBase
{
[Parameter]
public string Route { get; set; }
[Parameter]
public string Text { get; set; }
[Parameter]
public bool ShowIcon { get; set; } = false;
[Parameter]
public string IconFilename { get; set; } = string.Empty;
private string AltText => $"Navigation: {this.Text}";
}