Add Disabled property to ActionLink

This commit is contained in:
Hisham Bin Ateya 2020-02-20 17:16:14 +03:00
parent d0e03ecbe2
commit 0eef1790c3

View File

@ -4,7 +4,14 @@
@if (authorized)
{
<NavLink class="@classname" href="@url" style="@style">@text</NavLink>
if (Disabled)
{
<NavLink class="@classname" href="@url" style="@style" disabled>@text</NavLink>
}
else
{
<NavLink class="@classname" href="@url" style="@style">@text</NavLink>
}
}
@code {
@ -26,6 +33,9 @@
[Parameter]
public string Style { get; set; } // optional
[Parameter]
public bool Disabled { get; set; } // optional
[Parameter]
public string EditMode { get; set; } // optional - specifies if a user must be in edit mode to see the action - default is true