From 24263025c93e68dbeb958a256f7e6580ebf94668 Mon Sep 17 00:00:00 2001 From: Mike Casas Date: Tue, 24 Mar 2020 21:27:35 -0400 Subject: [PATCH] Adds an icon for the link/button. --- .../Modules/Controls/ActionDialog.razor | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/ActionDialog.razor b/Oqtane.Client/Modules/Controls/ActionDialog.razor index a6522a07..bd3d5e2c 100644 --- a/Oqtane.Client/Modules/Controls/ActionDialog.razor +++ b/Oqtane.Client/Modules/Controls/ActionDialog.razor @@ -17,7 +17,7 @@ @@ -30,11 +30,11 @@ { if (Disabled) { - + } else { - + } } @@ -66,9 +66,13 @@ [Parameter] public Action OnClick { get; set; } // required if an Action is specified - executes a method in the calling component + [Parameter] + public string IconName { get; set; } // optional - specifies an icon for the link - default is no icon + bool _visible = false; bool _editmode = true; bool _authorized = false; + string _iconSpan = ""; protected override void OnParametersSet() { @@ -84,6 +88,12 @@ { _editmode = bool.Parse(EditMode); } + + if (!string.IsNullOrEmpty(IconName)) + { + _iconSpan = $" "; + } + _authorized = IsAuthorized(); }