From 4d9a762aadcfaeb67079362030a49e956d7a4f8d Mon Sep 17 00:00:00 2001 From: Volker Lieber <42102008+VolkerLieber@users.noreply.github.com> Date: Fri, 2 Feb 2024 09:32:12 +0100 Subject: [PATCH] Implement IconButton size The documentation defines a size property for icon buttons: (https://ix.siemens.io/docs/controls/button/#properties-ix-icon-button). This commit implements that. --- SiemensIXBlazor/Components/Button/IconButton.razor | 3 ++- SiemensIXBlazor/Components/Button/IconButton.razor.cs | 2 ++ SiemensIXBlazor/Enums/Button/IconButtonSize.cs | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 SiemensIXBlazor/Enums/Button/IconButtonSize.cs diff --git a/SiemensIXBlazor/Components/Button/IconButton.razor b/SiemensIXBlazor/Components/Button/IconButton.razor index 030357e..aee5ae4 100644 --- a/SiemensIXBlazor/Components/Button/IconButton.razor +++ b/SiemensIXBlazor/Components/Button/IconButton.razor @@ -15,5 +15,6 @@ color="@Color" icon="@Icon" oval="@Oval" loading="@Loading" -data-tooltip="@DataTooltip"> +data-tooltip="@DataTooltip" +size="@Size"> diff --git a/SiemensIXBlazor/Components/Button/IconButton.razor.cs b/SiemensIXBlazor/Components/Button/IconButton.razor.cs index ca15902..e1a12f3 100644 --- a/SiemensIXBlazor/Components/Button/IconButton.razor.cs +++ b/SiemensIXBlazor/Components/Button/IconButton.razor.cs @@ -20,6 +20,8 @@ public partial class IconButton [Parameter] public bool? Oval { get; set; } [Parameter] + public IconButtonSize Size { get; set; } = IconButtonSize._24; + [Parameter] public bool Selected { get; set; } = false; [Parameter] public string DataTooltip { get; set; } = string.Empty; diff --git a/SiemensIXBlazor/Enums/Button/IconButtonSize.cs b/SiemensIXBlazor/Enums/Button/IconButtonSize.cs new file mode 100644 index 0000000..61913ee --- /dev/null +++ b/SiemensIXBlazor/Enums/Button/IconButtonSize.cs @@ -0,0 +1,9 @@ +namespace SiemensIXBlazor.Enums.Button +{ + public enum IconButtonSize + { + _12 = 12, + _16 = 16, + _24 = 24 + } +} \ No newline at end of file