From cb484665ca7442e23935ec936388c0000ead3b8f Mon Sep 17 00:00:00 2001 From: Pavel Vesely Date: Sat, 30 May 2020 21:24:40 +0200 Subject: [PATCH] Allow to show icon only in action link --- Oqtane.Client/Modules/Controls/ActionLink.razor | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Oqtane.Client/Modules/Controls/ActionLink.razor b/Oqtane.Client/Modules/Controls/ActionLink.razor index d8ed32a6..55c80411 100644 --- a/Oqtane.Client/Modules/Controls/ActionLink.razor +++ b/Oqtane.Client/Modules/Controls/ActionLink.razor @@ -51,6 +51,9 @@ [Parameter] public string IconName { get; set; } // optional - specifies an icon for the link - default is no icon + + [Parameter] + public bool IconOnly { get; set; } // optional - specifies only icon in link protected override void OnParametersSet() { @@ -60,6 +63,11 @@ _text = Text; } + if (IconOnly && !string.IsNullOrEmpty(IconName)) + { + _text = string.Empty; + } + if (!string.IsNullOrEmpty(Parameters)) { _parameters = Parameters;