Skip to content

Commit

Permalink
update blind component
Browse files Browse the repository at this point in the history
  • Loading branch information
yagizhanNY committed Oct 5, 2023
1 parent dea8754 commit e34e4c2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
5 changes: 4 additions & 1 deletion SiemensIXBlazor/Components/Blind/Blind.razor
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@using Microsoft.JSInterop;
@using SiemensIXBlazor.Enums.Blind;
@using SiemensIXBlazor.Helpers;
@inject IJSRuntime JSRuntime
@inherits IXBaseComponent

@namespace SiemensIXBlazor.Components

<ix-blind @attributes="UserAttributes" class="@Class" style="@Style" id="@Id" label="@Label" collapsed="@Collapsed" icon="@Icon">
<ix-blind @attributes="UserAttributes" class="@Class" style="@Style" id="@Id" label="@Label" sublabel="@SubLabel" collapsed="@Collapsed" icon="@Icon"
variant="@(EnumParser<BlindVariant>.ParseEnumToString(Variant))">
@ChildContent
</ix-blind>
7 changes: 6 additions & 1 deletion SiemensIXBlazor/Components/Blind/Blind.razor.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using SiemensIXBlazor.Enums.Blind;
using SiemensIXBlazor.Interops;

namespace SiemensIXBlazor.Components
{
public partial class Blind
{
[Parameter]
public string Label { get; set; } = string.Empty;
public string? Label { get; set; }
[Parameter]
public string? SubLabel { get; set; }
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter, EditorRequired]
Expand All @@ -17,6 +20,8 @@ public partial class Blind
[Parameter]
public string? Icon { get; set; }
[Parameter]
public BlindVariant Variant { get; set; } = BlindVariant.insight;
[Parameter]
public EventCallback<bool> CollapsedChangedEvent { get; set; }

private BaseInterop _interop;
Expand Down
16 changes: 16 additions & 0 deletions SiemensIXBlazor/Enums/Blind/BlindVariant.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace SiemensIXBlazor.Enums.Blind
{
public enum BlindVariant
{
alarm,
critical,
info,
insight,
neutral,
notification,
outline,
primary,
success,
warning
}
}

0 comments on commit e34e4c2

Please sign in to comment.