Files
mapo-core/MP-TAB-SERV/Components/SlideMenu.razor.cs
T
2023-10-27 18:26:18 +02:00

37 lines
874 B
C#

using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
namespace MP_TAB_SERV.Components
{
public partial class SlideMenu
{
#region Public Properties
[Parameter]
public List<LinkMenu> MenuItems { get; set; } = new List<LinkMenu>();
#endregion Public Properties
#region Protected Properties
[Inject]
protected NavigationManager navManager { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected string cssActive(string currUri)
{
return navManager.Uri.Contains(currUri) ? "bg-dark text-light" : "";
}
protected async Task SetPage(string tgtUrl)
{
await Task.Delay(1);
navManager.NavigateTo(tgtUrl);
}
#endregion Protected Methods
}
}