-
Notifications
You must be signed in to change notification settings - Fork 0
AnchorEnabledTagHelper
StrutTower edited this page Nov 11, 2022
·
6 revisions
Simple tag helper that will disable a link if the supplied boolean is false. This is done by adding the class disable-link
. The CSS below is required.
<a href="#" asp-enabled="@Boolean">Link</a>
<a href="#" class="disable-link">Link</a>
Name | Required | Data Type | Descirption |
---|---|---|---|
asp-enabled | Required | Boolean | Boolean that sets if the link is enabled or not |
Requires the following CSS class:
a.disable-link {
pointer-events: none;
cursor: default;
color: [Your font color];
}
or using Sass:
a.disable-link {
pointer-events: none;
cursor: default;
color: $body-color;
}