Skip to content

Commit

Permalink
implement icon toggle button
Browse files Browse the repository at this point in the history
  • Loading branch information
yagizhanNY committed Oct 4, 2023
1 parent 41422c6 commit 3dd8620
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions SiemensIXBlazor/Components/ToggleButton/IconToggleButton.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@namespace SiemensIXBlazor.Components
@using SiemensIXBlazor.Enums.Button;
@using SiemensIXBlazor.Helpers;
@inherits IXBaseComponent
<ix-icon-toggle-button @attributes="UserAttributes"
class="@Class"
style="@Style"
id="@Id"
disabled="@Disabled"
ghost="@Ghost"
icon="@Icon"
loading="@Loading"
outline="@Outline"
pressed="@Pressed"
size="@Size"
variant="@(EnumParser<ButtonVariant>.ParseEnumToString(Variant))">
</ix-icon-toggle-button>
31 changes: 31 additions & 0 deletions SiemensIXBlazor/Components/ToggleButton/IconToggleButton.razor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Components;
using SiemensIXBlazor.Enums.Button;

namespace SiemensIXBlazor.Components
{
public partial class IconToggleButton
{
[Parameter, EditorRequired]
public string Id { get; set; }
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter]
public bool Disabled { get; set; } = false;
[Parameter]
public bool Ghost { get; set; } = false;
[Parameter]
public string? Icon { get; set; }
[Parameter]
public bool Loading { get; set; } = false;
[Parameter]
public bool Outline { get; set; } = false;
[Parameter]
public bool Pressed { get; set; } = false;
[Parameter]
public string Size { get; set; } = "24";
[Parameter]
public ButtonVariant Variant { get; set; } = ButtonVariant.secondary;
[Parameter]
public EventCallback<bool> PressedChangeEvent { get; set; }
}
}

0 comments on commit 3dd8620

Please sign in to comment.