feat(theme): StatusPill widget

This commit is contained in:
Joseph Doherty
2026-06-01 04:46:24 -04:00
parent 6736415a32
commit af8682c0f2
5 changed files with 42 additions and 0 deletions
@@ -0,0 +1,16 @@
@* Components/StatusPill.razor *@
<span class="chip @ChipClass">@ChildContent</span>
@code {
[Parameter, EditorRequired] public StatusState State { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
private string ChipClass => State switch
{
StatusState.Ok => "chip-ok",
StatusState.Warn => "chip-warn",
StatusState.Bad => "chip-bad",
StatusState.Info => "chip-info",
_ => "chip-idle",
};
}
@@ -0,0 +1,3 @@
namespace ZB.MOM.WW.Theme;
public enum StatusState { Ok, Warn, Bad, Idle, Info }
@@ -2,3 +2,4 @@
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using ZB.MOM.WW.Theme
@using ZB.MOM.WW.Theme.Components