From e6cf77e724b441c6558cececaa4a715cad19dba1 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Fri, 17 Jan 2025 13:34:16 +0100 Subject: [PATCH] Update ActionDialog Add method to ensure consistent button sizing This PR introduces a new private method GetButtonSize() to enhance the consistency of button sizing within our UI. The method specifically checks for the presence of the "btn-sm" class in the Action Button's class list and applies the same sizing to the Cancel Button if found. --- Oqtane.Client/Modules/Controls/ActionDialog.razor | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/ActionDialog.razor b/Oqtane.Client/Modules/Controls/ActionDialog.razor index b39b4f27..6a1e4fb5 100644 --- a/Oqtane.Client/Modules/Controls/ActionDialog.razor +++ b/Oqtane.Client/Modules/Controls/ActionDialog.razor @@ -24,7 +24,7 @@ { } - + @@ -71,7 +71,7 @@ else }
- +
@@ -196,7 +196,7 @@ else _openIconSpan = $"{(IconOnly ? "" : " ")}"; _iconSpan = $" "; } - + _permissions = (PermissionList == null) ? ModuleState.PermissionList : PermissionList; _authorized = IsAuthorized(); @@ -207,6 +207,15 @@ else _visible = (PageState.QueryString["dialog"] == Id); } } + /// + /// Checks the Class that is used for the Action Button, if it is small make the Cancel Button small as well. + /// + /// + /// + private string GetButtonSize() + { + return Class.Contains("btn-sm", StringComparison.OrdinalIgnoreCase) ? "btn-sm" : string.Empty; + } private bool IsAuthorized() {