You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Components/Components/NavMenu/NavLink.razor

36 lines
1.2 KiB

@namespace Connected.Components
@inherits SelectItemBase
@using Microsoft.AspNetCore.Components.Routing
<div @attributes="UserAttributes" class="@Classname" disabled="@Disabled" style="@Style">
@if (!OnClick.HasDelegate && Command == null)
{
<Microsoft.AspNetCore.Components.Routing.NavLink @onclick="@HandleNavigation"
class="@LinkClassname"
@attributes="@Attributes"
Match="@Match"
ActiveClass="@ActiveClass">
@if (!string.IsNullOrEmpty(Icon))
{
<Icon Icon="@Icon" Color="@IconColor" Class="@IconClassname"/>
}
<div class="mud-nav-link-text">
@ChildContent
</div>
</Microsoft.AspNetCore.Components.Routing.NavLink>
}
else
{
<div @onclick="OnClickHandler"
class="@LinkClassname"
ActiveClass="@ActiveClass">
@if (!string.IsNullOrEmpty(Icon))
{
<Icon Icon="@Icon" Color="@IconColor" Class="@IconClassname" />
}
<div Class="mud-nav-link-text">
@ChildContent
</div>
</div>
}
</div>